mirror of
https://github.com/rclone/rclone.git
synced 2026-07-01 11:25:04 -04:00
DeleteFile always passes a nil backupDir to DeleteFileWithBackupDir, so it never honours --backup-dir. The previous comment said it would move the file into the backup dir when --backup-dir was in effect, which does not match the code. Update the comment to state that DeleteFile always deletes and that callers should use DeleteFileWithBackupDir when --backup-dir support is required. Also document on DeleteFileWithBackupDir that the backupDir is found with BackupDir, which is relatively expensive, so it should be looked up once outside any delete loop rather than per object. #7566