mirror of
https://github.com/rclone/rclone.git
synced 2025-12-10 05:13:45 +00:00
vfs: fix applying modtime for an open Write Handle
The symptom of this was that the time set when the file was open was lost. This was causing one of the mount tests to fail too.
This commit is contained in:
@@ -181,7 +181,10 @@ func (fh *WriteFileHandle) close() (err error) {
|
||||
}
|
||||
fh.closed = true
|
||||
// leave writer open until file is transferred
|
||||
defer fh.file.delWriter(fh, false)
|
||||
defer func() {
|
||||
fh.file.delWriter(fh, false)
|
||||
fh.file.finishWriterClose()
|
||||
}()
|
||||
// If file not opened and not safe to truncate then then leave file intact
|
||||
if !fh.opened && !fh.safeToTruncate() {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user