We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8d10c2 commit 51b68b7Copy full SHA for 51b68b7
src/Files.App/ViewModels/ItemViewModel.cs
@@ -139,7 +139,11 @@ public async Task SetWorkingDirectoryAsync(string? value)
139
_ = Task.Run(() => jumpListService.AddFolderAsync(value));
140
141
WorkingDirectory = value;
142
- GitDirectory = GitHelpers.GetGitRepositoryPath(WorkingDirectory, Path.GetPathRoot(WorkingDirectory));
+
143
+ var pathRoot = FtpHelpers.IsFtpPath(WorkingDirectory)
144
+ ? WorkingDirectory.Substring(0, FtpHelpers.GetRootIndex(WorkingDirectory))
145
+ : Path.GetPathRoot(WorkingDirectory);
146
+ GitDirectory = pathRoot is null ? null : GitHelpers.GetGitRepositoryPath(WorkingDirectory, pathRoot);
147
OnPropertyChanged(nameof(WorkingDirectory));
148
}
149
0 commit comments