]> andersk Git - moira.git/commitdiff
Release old path's parent volume, if necessary (required some restructuring)
authorprobe <probe>
Tue, 18 Aug 1992 17:27:12 +0000 (17:27 +0000)
committerprobe <probe>
Tue, 18 Aug 1992 17:27:12 +0000 (17:27 +0000)
incremental/afs_rename.pl

index 1f8e2bee1087d81cc05e95253cfe4fa007eac539..026cdfc662eeba27bd0a05c96709f5cd9852b335 100644 (file)
@@ -55,14 +55,20 @@ if ($oldtype eq "ERR") {
 $newvname = "X" . $newvname if ($newtype eq "ERR");
 $newvname =~ s/[^-A-Za-z0-9_.]//g;     # strip out illegal characters
 
-&run("$fs rmm $oldpath");
 &run("$vos rename $oldvname $newvname -cell $newcell")
     if ($oldvname ne $newvname);
 &run("$vos remove $oldbackup $oldvname.backup -cell $oldcell")
     if ($oldbackup && $newvname =~ /^n\./);
-&run("$fs mkm $newpath $newvname")
-    if ($newtype eq "AFS");
-&release_parent($newpath);
+
+if ($oldtype eq "AFS") {
+    &run("$fs rmm $oldpath");
+    &release_parent($oldpath)
+       if ($newtype ne "AFS" || $oldpath ne $newpath);
+}
+if ($newtype eq "AFS") {
+    &run("$fs mkm $newpath $newvname");
+    &release_parent($newpath);
+}
 
 exit;
 
This page took 0.0387 seconds and 5 git commands to generate.