Skip to content

Commit

Permalink
Fix rename bug. ab#1406
Browse files Browse the repository at this point in the history
  • Loading branch information
hamedhajiloo committed Nov 19, 2022
1 parent e570e73 commit a289e91
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Client/Shared/Components/FileBrowser/FileBrowser.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1767,6 +1767,13 @@ private async Task RenameFolderAsync(FsArtifact artifact, string? newName)
{
await FileService.RenameFolderAsync(artifact.FullPath, newName);
artifact.Name = newName;
var path = Path.GetDirectoryName(artifact.FullPath);
if (path is null)
return;

var newPath = Path.Combine(path, artifact.Name);
artifact.FullPath = newPath;
artifact.LocalFullPath = newPath;
}
}
catch (Exception exception)
Expand Down

0 comments on commit a289e91

Please sign in to comment.