From a403cb33890f39f239d513abe758697819485236 Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Wed, 22 Oct 2025 00:31:01 +1000 Subject: [PATCH] implement disk event move directory --- .../FileWatching/IdeFileExternalChangeHandler.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/SharpIDE.Application/Features/FileWatching/IdeFileExternalChangeHandler.cs b/src/SharpIDE.Application/Features/FileWatching/IdeFileExternalChangeHandler.cs index babea56..d467c14 100644 --- a/src/SharpIDE.Application/Features/FileWatching/IdeFileExternalChangeHandler.cs +++ b/src/SharpIDE.Application/Features/FileWatching/IdeFileExternalChangeHandler.cs @@ -32,10 +32,13 @@ public class IdeFileExternalChangeHandler var isMoveRatherThanRename = Path.GetDirectoryName(oldFolderPath) != Path.GetDirectoryName(newFolderPath); if (isMoveRatherThanRename) { - throw new NotImplementedException("Moving folders is not yet supported. Note that this should only be encountered on Linux."); + await _sharpIdeSolutionModificationService.MoveDirectory(sharpIdeFolder, sharpIdeFolder); + } + else + { + var newFolderName = Path.GetFileName(newFolderPath); + await _sharpIdeSolutionModificationService.RenameDirectory(sharpIdeFolder, newFolderName); } - var newFolderName = Path.GetFileName(newFolderPath); - await _sharpIdeSolutionModificationService.RenameDirectory(sharpIdeFolder, newFolderName); } private async Task OnFolderDeleted(string folderPath)