Watch new directory when created

This commit is contained in:
Joe Lim committed 2024-04-22 11:40:33 +10:00
1 parent c695904614
commit 6856804313
1 file changed
+4 -1
+4 -1
View File
@@ -645,8 +645,11 @@ func (app *app) updateFile(path string, add bool) {
}
if add {
if _, err := os.Stat(path); err == nil {
if stat, err := os.Stat(path); err == nil {
allFiles = append(allFiles, newFile(path))
if stat.IsDir() {
app.nav.setWatches()
}
}
}
dir.allFiles = allFiles