mirror of
https://github.com/rclone/rclone.git
synced 2026-01-04 17:43:50 +00:00
fs: Implement --no-update-dir-modtime to disable setting modification times on dirs
This commit is contained in:
@@ -2612,6 +2612,11 @@ func CopyDirMetadata(ctx context.Context, f fs.Fs, dst fs.Directory, dir string,
|
||||
// It does not create the directory.
|
||||
func SetDirModTime(ctx context.Context, f fs.Fs, dst fs.Directory, dir string, modTime time.Time) (newDst fs.Directory, err error) {
|
||||
logName := dirName(f, dst, dir)
|
||||
ci := fs.GetConfig(ctx)
|
||||
if ci.NoUpdateDirModTime {
|
||||
fs.Debugf(logName, "Skipping set directory modification time as --no-update-dir-modtime is set")
|
||||
return nil, nil
|
||||
}
|
||||
if SkipDestructive(ctx, logName, "set directory modification time") {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user