mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Don't remove imported archives by default
This commit is contained in:
@ -176,7 +176,7 @@ namespace osu.Game.Database
|
||||
// TODO: Add a check to prevent files from storage to be deleted.
|
||||
try
|
||||
{
|
||||
if (import != null && File.Exists(path))
|
||||
if (import != null && File.Exists(path) && ShouldRemoveArchive(path))
|
||||
File.Delete(path);
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -503,6 +503,11 @@ namespace osu.Game.Database
|
||||
/// </summary>
|
||||
protected abstract IEnumerable<string> GetStableImportPaths();
|
||||
|
||||
/// <summary>
|
||||
/// Should this archive be removed after importing?
|
||||
/// </summary>
|
||||
protected virtual bool ShouldRemoveArchive(string path) => false;
|
||||
|
||||
/// <summary>
|
||||
/// This is a temporary method and will likely be replaced by a full-fledged (and more correctly placed) migration process in the future.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user