Skip to content

Commit f14af2d

Browse files
authored
Merge pull request #90 from Arlodotexe/fix/systemio/folder/invalid-path-in-filenotfoundexception
Fix FileNotFoundException messages to use correct path variable
2 parents 37a0cc6 + b3208f2 commit f14af2d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/OwlCore.Storage.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
Added new ICreateRenamedCopy and IMoveRenamedFrom extension method overloads and corresponding extension method interfaces for ICreateCopy and IMoveFrom.
2929
Implemented ICreateRenamedCopy and IMoveRenamedFrom in SystemFolder.
3030

31+
[Improvements]
32+
Fix FileNotFoundException messages to use correct path variable
33+
3134
--- 0.12.3 ---
3235
[Fixes]
3336
Fixed an issue with GetItemByRelativePathAsync not recognizing Windows-style path separators when running on WASM on Windows.

src/System/IO/SystemFolder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public SystemFolder(string path)
3131
}
3232

3333
if (!Directory.Exists(path))
34-
throw new FileNotFoundException($"Directory not found at path '{Path}'.");
34+
throw new FileNotFoundException($"Directory not found at path '{path}'.");
3535

3636
// For consistency, always remove the trailing directory separator.
3737
Path = path.TrimEnd(global::System.IO.Path.PathSeparator, global::System.IO.Path.DirectorySeparatorChar, global::System.IO.Path.AltDirectorySeparatorChar);
@@ -44,7 +44,7 @@ public SystemFolder(string path)
4444
public SystemFolder(DirectoryInfo info)
4545
{
4646
if (!info.Exists)
47-
throw new FileNotFoundException($"Directory not found at path '{Path}'.");
47+
throw new FileNotFoundException($"Directory not found at path '{info.FullName}'.");
4848

4949
_info = info;
5050

0 commit comments

Comments
 (0)