rclone/vfs
Nick Craig-Wood 652d3cdee4 vfs: windows: fix slow opening of exe files by not truncating files when not necessary
Before this change we truncated files in the backing store regardless
of whether we needed to or not.

After, we check to see if the file is the right size and don't
truncate if it is.

Apparently Windows Defender likes to check executables each time they
are modified, and truncating a file to its existing size is enough to
trigger the Windows Defender scan. This was causing a big slowdown for
operations which opened and closed the file a lot, such as looking at
properties on an executable.

See: https://forum.rclone.org/t/for-mount-sftp-why-right-click-on-exe-file-is-so-slow-until-it-freezes/33830
2022-11-14 17:05:51 +00:00
..
test_vfs Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
vfscache vfs: windows: fix slow opening of exe files by not truncating files when not necessary 2022-11-14 17:05:51 +00:00
vfscommon build: add package comments to silence revive linter 2022-08-28 13:43:51 +02:00
vfsflags vfs: add --vfs-disk-space-total-size option to manually set the total disk space 2022-07-08 17:26:54 +01:00
vfstest Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
dir_handle_test.go 🧪 fstest: fix time tests on Windows and add convenience methods to check local and remote fs with precision 2021-11-09 11:43:36 +00:00
dir_handle.go Spelling fixes 2020-10-14 15:21:31 +01:00
dir_test.go 🧪 fstest: fix time tests on Windows and add convenience methods to check local and remote fs with precision 2021-11-09 11:43:36 +00:00
dir.go all: fix spelling across the project 2022-08-30 11:16:26 +02:00
errors_test.go vfs: add tests and subsequent fixes 2017-11-04 10:24:10 +00:00
errors.go build: drop support for go1.8 2019-04-15 21:49:58 +01:00
file_test.go Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
file.go build: reformat comments to pass go1.19 vet 2022-08-05 16:35:41 +01:00
help.go build: reformat comments to pass go1.19 vet 2022-08-05 16:35:41 +01:00
make_open_tests.go Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
open_test.go vfs: bring DO NOT EDIT comments in line with "go help generate" 2020-04-30 12:24:44 +01:00
rc_test.go vfs: add vfs/stats remote control to show statistics - fixes #5816 2021-11-23 18:00:21 +00:00
rc.go vfs: add vfs/stats remote control to show statistics - fixes #5816 2021-11-23 18:00:21 +00:00
read_test.go 🧪 fstest: fix time tests on Windows and add convenience methods to check local and remote fs with precision 2021-11-09 11:43:36 +00:00
read_write_test.go Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
read_write.go build: reformat comments to pass go1.19 vet 2022-08-05 16:35:41 +01:00
read.go build: reformat comments to pass go1.19 vet 2022-08-05 16:35:41 +01:00
vfs_case_test.go 🧪 fstest: fix time tests on Windows and add convenience methods to check local and remote fs with precision 2021-11-09 11:43:36 +00:00
vfs_test.go 🧪 fstest: fix time tests on Windows and add convenience methods to check local and remote fs with precision 2021-11-09 11:43:36 +00:00
vfs.go Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
vfstest_test.go mount: change interface of mount commands to take mount options 2020-07-24 10:48:51 +01:00
vstate_string.go vfs: fix virtual entries causing deleted files to still appear 2020-11-10 16:47:25 +00:00
write_test.go Remove github.com/pkg/errors and replace with std library version 2021-11-07 11:53:30 +00:00
write.go rcat: preserve metadata when Copy falls back to Rcat 2022-11-10 12:04:35 +00:00