From b45c511a9cf9282ee4b00834deb7bbfadc4ec00c Mon Sep 17 00:00:00 2001 From: Alexey Sonkin Date: Thu, 7 Mar 2024 15:57:09 +0300 Subject: [PATCH] Fix loaddir command (update exists directories) --- Plugins/NyaFsFiles/Commands/LoadDir.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Plugins/NyaFsFiles/Commands/LoadDir.cs b/Plugins/NyaFsFiles/Commands/LoadDir.cs index 2672bf9..45294e8 100644 --- a/Plugins/NyaFsFiles/Commands/LoadDir.cs +++ b/Plugins/NyaFsFiles/Commands/LoadDir.cs @@ -154,7 +154,7 @@ private void LoadFile(Dir dir, string path) else { var Content = System.IO.File.ReadAllBytes(DetectedFilename); - var File = new File(Path, User, Group, FileMode, Content); + var File = new File(FsPath, User, Group, FileMode, Content); dir.Items.Add(File); Log.Write(0, $"Added {FsPath}!"); @@ -188,6 +188,8 @@ private bool LoadDirectory(Dir dir, string path) NDir.Modified = DateTime.Now; Log.Write(2, $"Updated {FsPath}!"); + + LoadDirectory(NDir, Dir); } else Log.Warning(0, $"Cannot update {FsPath}: not directory!");