Watch new directory when created
This commit is contained in:
1 file changed
+4
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user