Rev 510 Rev 511
Line 48... Line 48...
48 $rev = $youngest; 48 $rev = $youngest;
49   49  
50 // Create a temporary directory. Here we have an unavoidable but highly 50 // Create a temporary directory. Here we have an unavoidable but highly
51 // unlikely to occure race condition 51 // unlikely to occure race condition
52   52  
-   53 $tmpfile1 = tempnam("temp", "wsvn");
53 $tmpname = tempnam("temp", "wsvn"); 54 $tmpfile2 = tempnam("temp", "wsvn");
-   55 $tempname = $tmpfile1.$tmpfile2;
54 if (mkdir("dir".$tmpname)) 56 if (mkdir($tmpname))
55 { 57 {
56 // Get the name of the directory being archived 58 // Get the name of the directory being archived
57 $arcname = substr($path, 0, -1); 59 $arcname = substr($path, 0, -1);
58 $arcname = basename($arcname); 60 $arcname = basename($arcname);
59 if (empty($arcname)) 61 if (empty($arcname))
Line 102... Line 104...
102 $cmd = quoteCommand("rm -fr ".quote($tmpname), false); 104 $cmd = quoteCommand("rm -fr ".quote($tmpname), false);
103 // } 105 // }
104 106
105 @exec($cmd); 107 @exec($cmd);
106 } 108 }
-   109 unlink($tmpfile1);
107 unlink($tmpname); 110 unlink($tmpfile2);
108 ?> 111 ?>