1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 15:57:24 +08:00
osu-lazer/osu.Game
Bartłomiej Dach 83e47b3c4c
Fix exports containing zero byte files after import from specific ZIP archives
Closes https://github.com/ppy/osu/issues/27540.

As it turns out, some ZIP archivers (like 7zip) will decide to add fake
entries for directories, and some (like windows zipfolders) won't.
The "directory" entries aren't really properly supported using any
actual data or attributes, they're detected by sharpcompress basically
by heuristics:

    ab5535eba3/src/SharpCompress/Common/Zip/Headers/ZipFileEntry.cs (L19-L31)

When importing into realm we have thus far presumed that these directory
entries will not be a thing. Having them be a thing breaks multiple
things, like:

- When importing from ZIPs with separate directory entries, a separate
  `RealmFile` is created for a directory entry even though it doesn't
  represent a real file
- As a result, when re-exporting a model with files imported from such
  an archive, a zero-byte file would be created because to the database
  it looks like it was originally a zero-byte file.

If you want to have fun, google "zip empty directories". You'll see
a whole gamut of languages, libraries, and developers stepping on this
rake. Yet another episode of underspecced mistakes from decades ago
that were somebody's "good idea" but continue to wreak havoc forevermore
because now there are two competing conventions you can't just pick one.
2024-03-12 09:06:24 +01:00
..
Audio Add fallback to find spinner samples without a bank prefix 2024-03-09 01:10:28 +09:00
Beatmaps Merge pull request #27501 from turbedi/throw_helper 2024-03-07 11:36:21 +01:00
Collections Apply safeties for AudioFilter usage around drawables which go non-present 2024-02-26 21:22:25 +08:00
Configuration Use more correct implementation 2024-02-22 09:44:59 +01:00
Database Merge pull request #27501 from turbedi/throw_helper 2024-03-07 11:36:21 +01:00
Extensions Fix date failing to display on leaderboard for some scores with weird datetimes 2024-01-14 13:52:39 +01:00
Graphics Expose TRANSITION_LENGTH from tab control 2024-03-07 08:20:20 +03:00
Input Add bindings for stepping backward/forward 2024-01-18 20:38:25 +09:00
IO Fix exports containing zero byte files after import from specific ZIP archives 2024-03-12 09:06:24 +01:00
IPC Handle osu:// scheme links via IPC in desktop game 2022-06-20 21:26:22 +02:00
Localisation Fix "unranked explaination" tooltip text using incorrect translation key 2024-03-02 22:45:15 +03:00
Models Use native query to avoid huge overheads when cleaning up realm files 2024-01-09 15:37:29 +09:00
Online Fix ruleset medals not displaying due to deserialisation failure 2024-03-11 21:34:10 +01:00
Overlays Merge branch 'master' into wrap-beatmap-listing-filters 2024-03-11 14:59:48 +01:00
Performance Add basic xmldoc on interface type 2024-02-27 20:46:25 +08:00
Properties Make medal overlay respect overlay disable via activation mode 2024-02-20 16:31:31 +01:00
Replays Show smoke in replays 2022-09-18 17:55:06 -07:00
Rulesets Fix 1px flashlight gaps when gameplay scaling mode is active 2024-03-08 11:07:30 +01:00
Scoring Merge pull request #27513 from bdach/osu-score-conversion-bad-very-not-good 2024-03-07 17:05:32 +09:00
Screens Fic incorrect ExtendableCircle gradient 2024-03-10 22:45:29 +03:00
Skinning Add support for Argon hitsounds 2024-03-08 21:43:18 +09:00
Storyboards Move optimisation to isolated method 2024-03-06 19:25:13 +08:00
Tests Add flag to allow backwards seeks in tests 2024-02-29 23:05:28 +08:00
Updater Merge pull request #26930 from Susko3/suggest-update-only-if-available 2024-02-10 22:08:56 +08:00
Users Simplify assignment by using an auto property 2024-03-09 20:17:27 +08:00
Utils Merge pull request #27501 from turbedi/throw_helper 2024-03-07 11:36:21 +01:00
.editorconfig Add localisation length hinting 2022-04-28 19:26:28 +09:00
FodyWeavers.xml More realm analytic disables 2023-07-20 17:51:33 +09:00
osu!.res And then everything became one 2017-09-19 16:06:58 +09:00
osu.Game.csproj Update resources 2024-03-09 20:48:57 +08:00
OsuGame.cs Merge pull request #27276 from bdach/medals 2024-03-06 12:31:55 +08:00
OsuGameBase_Importing.cs Automated pass 2023-06-24 01:00:03 +09:00
OsuGameBase.cs Move SoloStatisticsWatcher to OsuGame 2024-02-13 14:28:24 +01:00
PerformFromMenuRunner.cs Partial everything 2022-11-27 00:00:27 +09:00