4ac662d144
Before this change when reading directories we would use the directory handle and the Readdir(-1) call on the directory handle. This worked fine for the first read, but if the directory was read again on the same handle Readdir(-1) returns nothing (as per its design). It turns out that macOS leaves the directory handle open and just re-reads the data from it, so this problem causes directories to start out full then subsequently appear empty. macOS/OSXFUSE is passing an offset of 0 to the Readdir call telling rclone to seek in the directory, but we've told FUSE that we can't seek by always returning ofst=0 in the fill function. This fix works around the problem by reading the directory from the path each time, ignoring the actual handle. This should be no less efficient. We will return an ESPIPE if offset is ever non 0. There are possible corner cases reading deleted directories which this ignores. |
||
---|---|---|
.. | ||
fs.go | ||
mount.go | ||
mount_test.go | ||
mount_unsupported.go |