Closed KaiHoewelmeyer-TomTom closed 4 months ago
Could not reproduce the accidental deletion of the 'hello' folder.
But lua= require('carbon.entry').find('/Users/kaihowl/.dotfiles/hello'):children()
returns an empty array while the folder contains files a
and b
. The entry in the cache seems stale.
Next: Is the watcher correctly treating the item?
The watcher is still in place for the folder hello
. This is either a problem with libuv and watching a deleted / recreated folder or a problem with carbon's infra.
The problem seems to lie with a resync triggered for a view with a non-existent root.
Does this maybe create an entry with a non-directory type? This will later then prevent recursing the children.
Found and seemed to have fixed the error: A failure to scan a non-existent folder is treated the same way as encountering an empty folder here. The folder is then treated as empty and stored in the entries.items list. This way it remains empty.
A fix is to add an else
case here and treat non userdata
cases / nil
cases for the handle
by returning a nil
value instead of an empty table.
Fixed with carbon in version 0.20.1. Tested and confirmed.
Repro:
The repro requires a root of a Carbon buffer to be deleted and added again. This leads to a buffer showing any parent of the deleted folder to also not update correctly.