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

Commit 6066668

Browse files
committed
Try fixing encoding issues on powerFS.
1 parent 17b764e commit 6066668

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/plugins/action.powerfs/PowerFSController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ public function switchAction(ServerRequestInterface &$request, ResponseInterface
121121
$replaceSearch = array($rootDir, "\\");
122122
$replaceReplace = array("", "/");
123123
foreach ($selection->getFiles() as $selectionFile) {
124+
$selectionFile = TextEncoder::toStorageEncoding($selectionFile);
124125
$baseFile = $selectionFile;
125126
$args[] = escapeshellarg(substr($selectionFile, strlen($dir) + ($dir == "/" ? 0 : 1)));
126127
$selectionFile = FsAccessWrapper::getRealFSReference($urlBase . $selectionFile);
@@ -133,8 +134,8 @@ public function switchAction(ServerRequestInterface &$request, ResponseInterface
133134
}
134135
if (trim($baseFile, "/") == "") {
135136
// ROOT IS SELECTED, FIX IT
136-
$args = array(escapeshellarg(basename($rootDir)));
137-
$rootDir = dirname($rootDir);
137+
$args = array(escapeshellarg(TextEncoder::toStorageEncoding(basename($rootDir))));
138+
$rootDir = TextEncoder::toStorageEncoding(dirname($rootDir));
138139
break;
139140
}
140141
}

0 commit comments

Comments
 (0)