1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-08 02:59:48 +08:00
osu-lazer/osu.Game
Bartłomiej Dach fe86ee629e Fix temp files from beatmap listing imports not being cleaned up
As reported in #12718, it turns out that temporary files from beatmap
set downloads performed via the beatmap listing overlay could remain in
the user's filesystem even after the download has concluded.

The reason for the issue is a failure in component integration.
In the case of online downloads, files are first downloaded to a
temporary directory (`C:/Temp` or `/tmp`), with a randomly generated
filename, which ends in an extension of `.tmp`.

On the other side, `ArchiveModelManager`s have a `ShouldDeleteArchive()`
method, which determines whether a file should be deleted after
importing. At the time of writing, in the case of beatmap imports the
file is only automatically cleaned up if the extension of the file is
equal to `.osz`, which was not the case for temporary files.

As it turns out, `APIDownloadRequest` has a facility for adjusting the
file's extension, via the protected `FileExtension` property. Therefore,
use it in the case of `DownloadBeatmapSetRequest` to specify `.osz`,
which then will make sure that the `ShouldDeleteArchive()` check in
`BeatmapManager` picks it up for clean-up.
2021-05-08 17:09:14 +02:00
..
Audio Fix audio previews not being adjusted in volume correctly 2021-02-17 20:51:17 +09:00
Beatmaps Merge pull request #12617 from Joehuu/fix-pp-column-approved-maps 2021-05-02 13:27:39 +09:00
Collections Apply ConfigureAwait changes to game side 2021-03-08 14:36:35 +09:00
Configuration Add back ctor doc 2021-04-28 03:54:42 +09:00
Database Fix import cancellation not correctly being forwarded to import notification 2021-04-28 16:09:50 +09:00
Extensions Refactor SelectionBlueprint and MoveSelectionEvent to work in screen-space coordinates 2021-04-29 16:10:42 +09:00
Graphics Merge branch 'master' into skin-bindables 2021-05-05 20:16:27 +02:00
Input Add the skin editor to the game 2021-04-29 17:20:22 +09:00
IO Remove empty <returns> xmldoc 2021-04-12 17:46:14 +09:00
IPC Apply ConfigureAwait changes to game side 2021-03-08 14:36:35 +09:00
Migrations Remove alt-mousewheel bindings for volume adjustment 2021-04-12 14:00:32 +09:00
Online Fix temp files from beatmap listing imports not being cleaned up 2021-05-08 17:09:14 +02:00
Overlays Merge branch 'master' into add-missing-author-links 2021-05-07 14:32:44 +09:00
Properties Merge remote-tracking branch 'upstream/master' into android 2019-01-29 18:13:43 -06:00
Replays Update HasFlag usages to HasFlagFast 2021-02-25 15:38:56 +09:00
Rulesets Return back removed using 2021-05-03 02:02:14 +03:00
Scoring Fix formatting 2021-04-29 17:19:25 +08:00
Screens Merge pull request #12488 from Denrage/add-missing-author-links 2021-05-08 05:41:40 +09:00
Skinning Change scale multiplier to be closer to expectations 2021-05-03 15:25:18 +09:00
Storyboards Cache last event time value to avoid super expensive LINQ 2021-05-04 16:48:13 +09:00
Tests Unrevert null-colaescing/conditionals removal 2021-05-07 09:54:14 +03:00
Updater Update usages of config with framework changes 2021-03-17 16:10:16 +09:00
Users Add best count from api 2021-05-02 13:33:25 -07:00
Utils Merge pull request #12330 from Cublibre/master 2021-04-15 19:21:04 +09:00
osu!.res And then everything became one 2017-09-19 16:06:58 +09:00
osu.Game.csproj Update framework 2021-05-07 19:16:00 +09:00
OsuGame.cs Move private field for skin editor overlay to where others exist 2021-05-03 15:17:04 +09:00
OsuGameBase.cs Tidy up initialisation code and avoid using DI on inherited class 2021-04-19 11:30:55 +09:00
PerformFromMenuRunner.cs Add flow to allow MatchSubScreen to handle beatmap presentation locally 2021-03-03 14:13:51 +09:00