Ticket #2125 (User asked twice about overwriting file)

fixed: asking twice on file overwrite on move operations across filesystems
This commit is contained in:
Martin Petricek 2010-03-31 22:04:49 +02:00
parent 0731ad5e60
commit 62f7fa55f4
1 changed files with 4 additions and 0 deletions

View File

@ -1054,6 +1054,7 @@ move_file_file (FileOpTotalContext *tctx, FileOpContext *ctx, const char *s, con
struct stat src_stats, dst_stats;
FileProgressStatus return_status = FILE_CONT;
gboolean copy_done = FALSE;
gboolean old_ask_overwrite;
file_progress_show_source (ctx, s);
file_progress_show_target (ctx, d);
@ -1121,7 +1122,10 @@ move_file_file (FileOpTotalContext *tctx, FileOpContext *ctx, const char *s, con
#endif
/* Failed because filesystem boundary -> copy the file instead */
old_ask_overwrite = tctx->ask_overwrite;
tctx->ask_overwrite = FALSE;
return_status = copy_file_file (tctx, ctx, s, d);
tctx->ask_overwrite = old_ask_overwrite;
if (return_status != FILE_CONT)
return return_status;