Skip to content

Commit 58c3b73

Browse files
committed
Fix directory path issue
1 parent deb22ad commit 58c3b73

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public BinaryStorage(string filename)
4545
[Obsolete("This constructor is obsolete. Use BinaryStorage(string filename) instead.")]
4646
public BinaryStorage(string filename, string directoryPath = null!)
4747
{
48-
directoryPath ??= DataLocation.CacheDirectory;
49-
FilesFolders.ValidateDirectory(directoryPath);
48+
DirectoryPath = directoryPath ?? DataLocation.CacheDirectory;
49+
FilesFolders.ValidateDirectory(DirectoryPath);
5050

51-
FilePath = Path.Combine(directoryPath, $"{filename}{FileSuffix}");
51+
FilePath = Path.Combine(DirectoryPath, $"{filename}{FileSuffix}");
5252
}
5353

5454
public async ValueTask<T> TryLoadAsync(T defaultData)

Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ namespace Flow.Launcher.Infrastructure.Storage
1717

1818
public FlowLauncherJsonStorage()
1919
{
20-
var directoryPath = Path.Combine(DataLocation.DataDirectory(), DirectoryName);
21-
FilesFolders.ValidateDirectory(directoryPath);
20+
DirectoryPath = Path.Combine(DataLocation.DataDirectory(), DirectoryName);
21+
FilesFolders.ValidateDirectory(DirectoryPath);
2222

2323
var filename = typeof(T).Name;
24-
FilePath = Path.Combine(directoryPath, $"{filename}{FileSuffix}");
24+
FilePath = Path.Combine(DirectoryPath, $"{filename}{FileSuffix}");
2525
}
2626

2727
public new void Save()

0 commit comments

Comments
 (0)