rclone/cmd
Nick Craig-Wood 4ac662d144 cmount: fix macOS losing directory contents #4393
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.
2020-07-24 15:38:08 +01:00
..
about cmd: fix environment variables not setting command line flags 2019-10-14 17:02:09 +01:00
all backend: add new backend command for backend specific commands 2020-04-29 10:10:57 +01:00
authorize config: do not open browser on headless if google fs 2019-10-30 14:12:42 +00:00
backend doc: fix typos throughout docs and code 2020-05-25 11:23:58 +01:00
cachestats cachestats: deprecate in favour of rclone backend stats cache: 2020-04-29 10:10:57 +01:00
cat docs: restore lost spelling fixes 2020-02-10 15:29:39 +00:00
check check,cryptcheck: add reporting of filenames for same/missing/changed #3264 2020-07-21 22:08:13 +01:00
cleanup cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
cmount cmount: fix macOS losing directory contents #4393 2020-07-24 15:38:08 +01:00
config docs: set unsafe HTML parsing to false and fix raw HTML insertion 2020-05-27 17:31:09 +01:00
copy docs: promote the use of -i/--interactive and "rclone sync -i" everywhere #1574 2020-06-10 12:33:53 +01:00
copyto cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
copyurl doc: fix typos throughout docs and code 2020-05-20 15:54:51 +01:00
cryptcheck check,cryptcheck: add reporting of filenames for same/missing/changed #3264 2020-07-21 22:08:13 +01:00
cryptdecode crypt: get rid of the unused Cipher interface as it obfuscated the code 2020-04-22 11:33:48 +01:00
dbhashsum dbhashsum: hide the command now it is deprecated 2020-04-29 10:12:12 +01:00
dedupe docs: promote the use of -i/--interactive and "rclone sync -i" everywhere #1574 2020-06-10 12:33:53 +01:00
delete docs: promote the use of -i/--interactive and "rclone sync -i" everywhere #1574 2020-06-10 12:33:53 +01:00
deletefile cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
genautocomplete genautocomplete: add support for fish shell 2020-04-29 16:19:35 +01:00
gendocs docs: remove manually set dates and use git dates instead 2020-06-01 13:07:46 +01:00
hashsum doc: fix typos throughout docs 2020-05-19 12:02:44 +01:00
info build: run gofmt -s to simplify the code: suggested by Go Report Card 2020-06-18 18:45:39 +01:00
link link: Add --expire and --unlink flags 2020-06-05 14:51:05 +01:00
listremotes cmd: fix environment variables not setting command line flags 2019-10-14 17:02:09 +01:00
ls cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
lsd cmd: fix environment variables not setting command line flags 2019-10-14 17:02:09 +01:00
lsf lsjson: Add --hash-type parameter and use it in lsf to speed up hashing 2020-04-29 16:09:45 +01:00
lsjson lsjson: Add --hash-type parameter and use it in lsf to speed up hashing 2020-04-29 16:09:45 +01:00
lsl cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
md5sum cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
memtest cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
mkdir mkdir: warn when using mkdir on remotes which can't have empty directories 2020-07-08 17:55:58 +01:00
mount mount: change interface of mount commands to take mount options 2020-07-24 10:48:51 +01:00
mount2 mount: change interface of mount commands to take mount options 2020-07-24 10:48:51 +01:00
mountlib mount: add VFS and Mount options to mount/listmounts 2020-07-24 10:48:51 +01:00
move docs: promote the use of -i/--interactive and "rclone sync -i" everywhere #1574 2020-06-10 12:33:53 +01:00
moveto docs: promote the use of -i/--interactive and "rclone sync -i" everywhere #1574 2020-06-10 12:33:53 +01:00
ncdu docs: set unsafe HTML parsing to false and fix raw HTML insertion 2020-05-27 17:31:09 +01:00
obscure obscure: write more help as we are referencing it elsewhere 2020-06-05 12:48:28 +01:00
purge docs: promote the use of -i/--interactive and "rclone sync -i" everywhere #1574 2020-06-10 12:33:53 +01:00
rc docs: fix rc docs and update anchors for new Hugo version 2020-05-27 17:31:08 +01:00
rcat cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
rcd rcd: move webgui apart; option to disable browser 2020-01-20 12:27:55 +00:00
reveal cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
rmdir cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
rmdirs build: fix up package paths after repo move 2019-07-28 18:47:38 +01:00
serve serve/ftp: use refactored goftp.io/server library for binary shrink 2020-07-21 16:23:55 +01:00
settier cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
sha1sum cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
size cmd: fix environment variables not setting command line flags 2019-10-14 17:02:09 +01:00
sync docs: promote the use of -i/--interactive and "rclone sync -i" everywhere #1574 2020-06-10 12:33:53 +01:00
touch touch: add ability to set nanosecond resolution times 2020-06-12 15:38:35 +01:00
tree tree: remove -i shorthand for --noindent as it conflicts with -i/--interactive 2020-06-10 12:33:53 +01:00
version cmd: fix environment variables not setting command line flags 2019-10-14 17:02:09 +01:00
cmd.go cmd: Note commands which need obscured input in the docs - fixes #4252 2020-05-31 12:59:09 +01:00
help.go docs: remove manually set dates and use git dates instead 2020-06-01 13:07:46 +01:00
progress.go lib/terminal: factor from cmd/progress, swap Azure/go-ansiterm for mattn/go-colorable 2019-10-08 19:59:47 +01:00
siginfo_darwin.go cmd: fix up stats printing on macOS after accounting change 2019-07-28 20:38:20 +01:00
siginfo_others.go cmd: add siginfo handler 2018-06-02 17:35:13 +01:00