Permalink
Browse files

Do not inverse slashes if not necessary!

git-svn-id: https://ajaxplorer.svn.sourceforge.net/svnroot/ajaxplorer/trunk@2804 3bf36de4-da32-0410-8312-848cfbfe3f7d
  • Loading branch information...
1 parent 5366ec6 commit f26a16ba5d7db8c8427f2c804e3939451a0ce1b2 cdujeu committed Apr 1, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 core/src/plugins/editor.imagick/class.IMagickPreviewer.php
@@ -161,13 +161,17 @@ public function generateJpegsCallback($masterFile, $targetFile){
$destStreamURL = $streamData["protocol"]."://".$repository->getId();
$path = $repository->getOption("PATH");
$masterFile = $path . str_replace($destStreamURL, "", $masterFile);
- $masterFile = str_replace("/", "\\", $masterFile);
+ if(DIRECTORY_SEPARATOR == "\\"){
+ $masterFile = str_replace("/", "\\", $masterFile);
+ }
$extension = pathinfo($masterFile, PATHINFO_EXTENSION);
$workingDir = dirname($targetFile);
$out = array();
$return = 0;
$tmpFileThumb = str_replace(".$extension", ".jpg", $targetFile);
- $tmpFileThumb = str_replace("/", "\\", $tmpFileThumb);
+ if(DIRECTORY_SEPARATOR == "\\"){
+ $tmpFileThumb = str_replace("/", "\\", $tmpFileThumb);
+ }
if(!$this->extractAll){
//register_shutdown_function("unlink", $tmpFileThumb);
}else{

0 comments on commit f26a16b

Please sign in to comment.