Fix overwrite check
authorJamie Cameron <jcameron@webmin.com>
Thu, 28 May 2009 18:22:10 +0000 (18:22 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 28 May 2009 18:22:10 +0000 (18:22 +0000)
cluster-copy/CHANGELOG
cluster-copy/cluster-copy-lib.pl
cluster-copy/lang/en

index 9ab5f55..a666e8e 100644 (file)
@@ -13,3 +13,5 @@ Made the backup email contents translatable.
 Added checkboxes and a button for deleting multiple cluster copies at once.
 ---- Changes since 1.430 ----
 Added a Module Config setting to control the default sort order.
+---- Changes since 1.470 ----
+Fixed check to prevent over-writing a file when copying to this host.
index fddeece..21a3040 100755 (executable)
@@ -185,7 +185,8 @@ foreach $s (@run) {
                                push(@errs, [ $f, "Source file not found" ]);
                                next;
                                }
-                       if ($f eq $dest && $s->{'id'} == 0) {
+                       if (&simplify_path($f) eq &simplify_path($dest) &&
+                           $s->{'id'} == 0) {
                                push(@errs, [ $f, "Cannot overwrite same file on this server" ]);
                                next;
                                }
index 53b5f48..8f02ae1 100644 (file)
@@ -1,4 +1,4 @@
-index_title=Cluster Copies
+index_title=Cluster Copy Files
 index_add=Create a new scheduled file copy.
 index_none=No scheduled file copies have been defined.
 index_servers=Copy to servers