mirror of https://github.com/rclone/rclone.git
fs: change the comments in the operations - fixes #7566
This commit is contained in:
parent
24fdecf107
commit
d994675e12
|
@ -485,8 +485,8 @@ func SuffixName(ctx context.Context, remote string) string {
|
||||||
// DeleteFileWithBackupDir deletes a single file respecting --dry-run
|
// DeleteFileWithBackupDir deletes a single file respecting --dry-run
|
||||||
// and accumulating stats and errors.
|
// and accumulating stats and errors.
|
||||||
//
|
//
|
||||||
// If backupDir is set then it moves the file to there instead of
|
// If backupDir is set then it moves the file to there instead of deleting
|
||||||
// deleting
|
// you use BackupDir to find the --backup-dir as it is relatively expensive so don't put it in a loop
|
||||||
func DeleteFileWithBackupDir(ctx context.Context, dst fs.Object, backupDir fs.Fs) (err error) {
|
func DeleteFileWithBackupDir(ctx context.Context, dst fs.Object, backupDir fs.Fs) (err error) {
|
||||||
tr := accounting.Stats(ctx).NewCheckingTransfer(dst, "deleting")
|
tr := accounting.Stats(ctx).NewCheckingTransfer(dst, "deleting")
|
||||||
defer func() {
|
defer func() {
|
||||||
|
@ -519,8 +519,8 @@ func DeleteFileWithBackupDir(ctx context.Context, dst fs.Object, backupDir fs.Fs
|
||||||
|
|
||||||
// DeleteFile deletes a single file respecting --dry-run and accumulating stats and errors.
|
// DeleteFile deletes a single file respecting --dry-run and accumulating stats and errors.
|
||||||
//
|
//
|
||||||
// If useBackupDir is set and --backup-dir is in effect then it moves
|
// call DeleteFileWithBackupDir if --backup-dir support is required
|
||||||
// the file to there instead of deleting
|
// as calling this function with --backup-dir will always returns nil
|
||||||
func DeleteFile(ctx context.Context, dst fs.Object) (err error) {
|
func DeleteFile(ctx context.Context, dst fs.Object) (err error) {
|
||||||
return DeleteFileWithBackupDir(ctx, dst, nil)
|
return DeleteFileWithBackupDir(ctx, dst, nil)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue