]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(copy_internal): Add braces around now-multi-stmt
authorJim Meyering <jim@meyering.net>
Sat, 8 Sep 2001 13:22:41 +0000 (13:22 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 8 Sep 2001 13:22:41 +0000 (13:22 +0000)
if-block.  This fixes a bug introduced by my 2001-08-06 change.

src/copy.c

index 2b2a0da6d7da2a043be82c0a91788d515d7c848c..b7f535c7b10d83654b8d43d587c956e2389cfa4c 100644 (file)
@@ -696,11 +696,13 @@ copy_internal (const char *src_path, const char *dst_path,
                    {
                      overwrite_prompt (dst_path, &dst_sb);
                      if (!yesno ())
-                       /* Pretend the rename succeeded, so the caller (mv)
-                          doesn't end up removing the source file.  */
-                       if (rename_succeeded)
-                         *rename_succeeded = 1;
-                       return 0;
+                       {
+                         /* Pretend the rename succeeded, so the caller (mv)
+                            doesn't end up removing the source file.  */
+                         if (rename_succeeded)
+                           *rename_succeeded = 1;
+                         return 0;
+                       }
                    }
                }
              else