Fix overwrite check

This commit is contained in:
Jamie Cameron
2009-05-28 18:22:10 +00:00
parent 29b9460f87
commit 7442867f3e
3 changed files with 5 additions and 2 deletions
+2
View 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.
+2 -1
View File
@@ -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;
}
+1 -1
View 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