Skip to content

Commit 6b4fbb8

Browse files
committed
修复打开程序根目录时的异常错误
1 parent 97eb281 commit 6b4fbb8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Firefly/ViewModels/MenuViewModel.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,11 @@ private static void OpenRelativeFile(string path)
170170
[RelayCommand]
171171
private static void OpenRelativeFolder(string path)
172172
{
173-
Directory.CreateDirectory(path);
173+
if (!String.IsNullOrWhiteSpace(path))
174+
{
175+
Directory.CreateDirectory(path);
176+
}
177+
174178
FileHelper.OpenFolder(path, true);
175179
}
176180

0 commit comments

Comments
 (0)