How to set O_TRUNC for files?

When I try to download a file using --vfs-cache-mode off, I get this error "WriteFileHandle: Can't open for write without O_TRUNC on existing file without --vfs-cache-mode >= writes"

How do I set O_TRUNC so that it doesn't error out?
Note: I want to directly download and upload files to mount without caching to disk

Mount config:

start rclone --no-console mount GDrive: C:\Users\User1\Documents\.Mount\GDrive --no-modtime --rc --rc-addr=:3750 --vfs-cache-mode off 
TIMEOUT /T 15
rclone rc vfs/refresh recursive=true --rc-addr=:3750 --timeout 15m -q
ECHO Priming Backup Cache... Complete
msg %username% Cache is Primed.
exit

You re-write/fix your application calling it to do that as nothing in rclone can impact that.

This happens when I download something via my broswer.

Is there any flags I can use to implement it?

Right, you can't fix that as that's what the browser is sending as it's an application item requesting a file to be opened in a certain manner.

Rclone can't do any flags to change an application's behavior.

Oh alright, understood. I tried with a download manager and it downloads normally without erroring out.

Thanks a lot for the info!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.