Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix PowerFS + Download All in minisite combination
  • Loading branch information
cdujeu committed Mar 18, 2014
1 parent fd408bb commit 944d2da
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/src/plugins/action.powerfs/class.PowerFSController.php
Expand Up @@ -138,6 +138,7 @@ public function switchAction($action, $httpVars, $fileVars)
$replaceSearch = array($rootDir, "\\");
$replaceReplace = array("", "/");
foreach ($selection->getFiles() as $selectionFile) {
$baseFile = $selectionFile;
$args[] = '"'.substr($selectionFile, strlen($dir)+($dir=="/"?0:1)).'"';
$selectionFile = fsAccessWrapper::getRealFSReference($urlBase.$selectionFile);
$todo[] = ltrim(str_replace($replaceSearch, $replaceReplace, $selectionFile), "/");
Expand All @@ -147,6 +148,12 @@ public function switchAction($action, $httpVars, $fileVars)
$todo[] = str_replace($replaceSearch, $replaceReplace, $name);
}
}
if(trim($baseFile, "/") == ""){
// ROOT IS SELECTED, FIX IT
$args = array(basename($rootDir));
$rootDir = dirname($rootDir);
break;
}
}
$cmdSeparator = ((PHP_OS == "WIN32" || PHP_OS == "WINNT" || PHP_OS == "Windows")? "&" : ";");
//$archiveName = SystemTextEncoding::fromUTF8($httpVars["archive_name"]);
Expand Down

0 comments on commit 944d2da

Please sign in to comment.