Ticket #155: phing-dev.delete.symlink.bug.patch
| File phing-dev.delete.symlink.bug.patch, 1.6 kB (added by Bruce Weirdan <weirdan@gmail.com>, 1 year ago) |
|---|
-
classes/phing/system/io/PhingFile.php
old new 530 530 */ 531 531 function delete() { 532 532 $fs = FileSystem::getFileSystem(); 533 if ($fs->c heckAccess($this, true) !== true) {534 throw new IOException(" No read access to " . $this->path."\n");533 if ($fs->canDelete($this) !== true) { 534 throw new IOException("Cannot delete " . $this->path . "\n"); 535 535 } 536 536 return $fs->delete($this); 537 537 } -
classes/phing/system/io/FileSystem.php
old new 128 128 */ 129 129 abstract function fromURIPath($path); 130 130 131 abstract function canDelete(PhingFile $f); 132 131 133 /* -- Path operations -- */ 132 134 133 135 /** … … 654 656 } // end compare 655 657 } 656 658 } 659 657 660 658 661 } -
classes/phing/system/io/UnixFileSystem.php
old new 262 262 263 263 return $p; 264 264 } 265 266 function canDelete(PhingFile $f) 267 { 268 @clearstatcache(); 269 $dir = dirname($f->getAbsolutePath()); 270 return (bool) @is_writable($dir); 271 } 265 272 266 273 }
