mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-23 04:57:17 +01:00
Fix DefaultIOManager bugs
- Fix `CreateResolverForSubdirectory` not considering if the input path was rooted. - Fix `DeleteDirectory` not resolving the input path.
This commit is contained in:
@@ -162,7 +162,8 @@ namespace Tgstation.Server.Host.IO
|
||||
=> Task.Factory.StartNew(
|
||||
() =>
|
||||
{
|
||||
var di = fileSystem.DirectoryInfo.New(path);
|
||||
var di = fileSystem.DirectoryInfo.New(
|
||||
ResolvePath(path));
|
||||
if (di.Exists)
|
||||
NormalizeAndDelete(di, cancellationToken);
|
||||
},
|
||||
@@ -416,11 +417,14 @@ namespace Tgstation.Server.Host.IO
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(subdirectoryPath);
|
||||
|
||||
if (!Path.IsPathRooted(subdirectoryPath))
|
||||
subdirectoryPath = ConcatPath(
|
||||
ResolvePath(),
|
||||
subdirectoryPath);
|
||||
|
||||
return new ResolvingIOManager(
|
||||
fileSystem,
|
||||
ConcatPath(
|
||||
ResolvePath(),
|
||||
subdirectoryPath));
|
||||
subdirectoryPath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user