mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-11-10 08:06:15 +00:00
Cleanup file related code (#14023)
This commit is contained in:
1 parent
4096c973c6
commit
0c3ba30de2
17 files changed
+104
-56
No files matched your search
@@ -159,13 +159,13 @@ namespace Emby.Server.Implementations.IO
|
||||
catch (IOException)
|
||||
{
|
||||
// Cross device move requires a copy
|
||||
Directory.CreateDirectory(destination);
|
||||
foreach (string file in Directory.GetFiles(source))
|
||||
var directory = Directory.CreateDirectory(destination);
|
||||
foreach (var file in directory.EnumerateFiles())
|
||||
{
|
||||
File.Copy(file, Path.Combine(destination, Path.GetFileName(file)), true);
|
||||
file.CopyTo(Path.Combine(destination, file.Name), true);
|
||||
}
|
||||
|
||||
Directory.Delete(source, true);
|
||||
directory.Delete(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user