Open pfrazee opened 7 years ago
Weird! I'll try and encapsulate that in a test. Was the file tree created in the same order as you list above?
It was, yeah
Noting from IRC that this only happens on parallel dels
I just got this again without parallel deletes
Yeah I get this consistently, now, in pauls-dat-api tests. (Should be relatively easy to setup a repeatable test for you to run.)
To reproduce:
You should find all tests passing, but a warning should be emitted saying rmdir issue (append-tree#6)
. That's a warning emitted at https://github.com/beakerbrowser/pauls-dat-api/blob/SLEEP/lib/delete.js#L121-L125, where I've disabled the full error-handling on account of this bug.
For me, this bug consistently occurs in my "recursive rename" algorithm, which does a recursive-copy and then a recursive-delete. There shoudnt be any parallelism involved; it just appears that deletes are deleting more than they should.
Just fixed a delete bug in latest hyperdrive (released on npm). Could try to see if that fixes this by any chance?
I'm writing a recursive delete algorithm, which looks like this:
That's being run against the following file-tree:
Specifically against the
/b
folder. A working log would look like this:But the log I get is this:
For some reason,
rmdir('/b/d/c')
is failing with File not found. If I run the entire method on the '/b/d' folder, no such error occurs!I'm wondering if the record of the '/b/d/c' folder is getting lost somehow?