Skip to content

Commit

Permalink
Fix loaddir command (update exists directories)
Browse files Browse the repository at this point in the history
  • Loading branch information
teplofizik committed Mar 7, 2024
1 parent 08254d9 commit b45c511
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Plugins/NyaFsFiles/Commands/LoadDir.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}!");
Expand Down Expand Up @@ -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!");
Expand Down

0 comments on commit b45c511

Please sign in to comment.