Merge pull request #1146 from pterodactyl/feature/windows-pathinfo-support

Add support for Windows, replace all backslashes with forwardslashes
This commit is contained in:
Dane Everitt 2018-05-20 16:24:58 -07:00 committed by GitHub
commit 002efddc96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -101,7 +101,7 @@ class FileActionsController extends Controller
{
$server = $request->attributes->get('server');
$dirname = pathinfo($file, PATHINFO_DIRNAME);
$dirname = str_replace('\\', '/', pathinfo($file, PATHINFO_DIRNAME));
try {
$content = $this->repository->setServer($server)->setToken($request->attributes->get('server_token'))->getContent($file);
} catch (RequestException $exception) {