mirror of
https://github.com/rclone/rclone
synced 2024-12-19 09:05:56 +01:00
cmount: use -o atomic_o_trunc to make sure O_TRUNC is supplied to Open()
This commit is contained in:
parent
57a5c67729
commit
60cdcf784c
@ -40,6 +40,11 @@ func mountOptions(device string, mountpoint string) (options []string) {
|
|||||||
"-o", "fsname=" + device,
|
"-o", "fsname=" + device,
|
||||||
"-o", "subtype=rclone",
|
"-o", "subtype=rclone",
|
||||||
"-o", fmt.Sprintf("max_readahead=%d", mountlib.MaxReadAhead),
|
"-o", fmt.Sprintf("max_readahead=%d", mountlib.MaxReadAhead),
|
||||||
|
// This causes FUSE to supply O_TRUNC with the Open
|
||||||
|
// call which is more efficient for cmount. However
|
||||||
|
// it does not work with cgofuse on Windows with
|
||||||
|
// WinFSP so cmount must work with or without it.
|
||||||
|
"-o", "atomic_o_trunc",
|
||||||
}
|
}
|
||||||
if mountlib.DebugFUSE {
|
if mountlib.DebugFUSE {
|
||||||
options = append(options, "-o", "debug")
|
options = append(options, "-o", "debug")
|
||||||
|
Loading…
Reference in New Issue
Block a user