Permalink
Browse files

Fix an issue with relative path symlinks (SLIR)

  • Loading branch information...
1 parent ff6f9ad commit e4eeec79023ee6ade486773d6117e0c47ee7f720 @kolber committed Mar 19, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/parsers/slir/slir.class.php
View
4 app/parsers/slir/slir.class.php
@@ -1130,13 +1130,13 @@ private function cacheFile($cacheFilePath, $imageData, $copyEXIF = TRUE, $symlin
$this->initializeCache();
// Try to create just a symlink to minimize disk space
- if ($symlinkToPath && function_exists('symlink') && (file_exists($cacheFilePath) || @symlink($symlinkToPath, $cacheFilePath)))
+ if ($symlinkToPath && function_exists('symlink') && (file_exists($cacheFilePath) || symlink('../'.$symlinkToPath, $cacheFilePath)))
{
return TRUE;
}
// Create the file
- if (!@file_put_contents($cacheFilePath, $imageData))
+ if (!file_put_contents($cacheFilePath, $imageData))
{
return FALSE;
}

0 comments on commit e4eeec7

Please sign in to comment.