Re: copy_file_file() cleanup
- From: Leonard den Ottolander <leonard den ottolander nl>
- To: Roland Illig <roland illig gmx de>
- Cc: MC Devel <mc-devel gnome org>
- Subject: Re: copy_file_file() cleanup
- Date: Tue, 16 Nov 2004 01:04:12 +0100
Hello Roland,
On Tue, 2004-11-16 at 00:40, Roland Illig wrote:
> Committed.
You forgot to commit the vfs.h hunk.
About the goto replaced with a while, attached patch gets rid of the
break. Hope I use the correct operator here ;) .
Leonard.
--
mount -t life -o ro /dev/dna /genetic/research
--- src/file.c.000 2004-11-16 00:52:59.000000000 +0100
+++ src/file.c 2004-11-16 01:00:43.000000000 +0100
@@ -490,23 +490,20 @@ copy_file_file (FileOpContext *ctx, cons
mc_refresh ();
- while (mc_stat (dst_path, &sb2) == 0) {
+ while (!dst_exists && mc_stat (dst_path, &sb2) == 0) {
if (S_ISDIR (sb2.st_mode)) {
- return_status =
- file_error (_(" Cannot overwrite directory \"%s\" \n %s "),
- dst_path);
+ return_status = file_error (
+ _(" Cannot overwrite directory \"%s\" \n %s "), dst_path);
if (return_status == FILE_RETRY)
continue;
return return_status;
}
dst_exists = 1;
- break;
}
while ((*ctx->stat_func) (src_path, &sb)) {
- return_status =
- file_error (_(" Cannot stat source file \"%s\" \n %s "),
- src_path);
+ return_status = file_error (
+ _(" Cannot stat source file \"%s\" \n %s "), src_path);
if (return_status != FILE_RETRY)
return return_status;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]