Skip to content

Commit

Permalink
Fixed issue with windows paths in parent field #1699
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jun 22, 2019
1 parent 06eff3b commit da2f761
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.10.0-beta.3
## mm/dd/2019

1. [](#bugfix)
* Fixed issue with windows paths in `parent` field [#1699](https://github.com/getgrav/grav-plugin-admin/issues/1699)

# v1.10.0-beta.2
## 06/21/2019

Expand Down
5 changes: 3 additions & 2 deletions classes/plugin/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2340,8 +2340,9 @@ protected function getFolderListing($data)
continue;
}
} else {
$file_page = $page_instances[$fileInfo->getPathname()] ?? null;
$file_path = Utils::replaceFirstOccurrence(GRAV_ROOT, '', $fileInfo->getPathname());
$file_path = str_replace('\\', '/', $fileInfo->getPathname());
$file_page = $page_instances[$file_path] ?? null;
$file_path = Utils::replaceFirstOccurrence(GRAV_ROOT, '', $file_path);
$type = $fileInfo->getType();

$payload = [
Expand Down

0 comments on commit da2f761

Please sign in to comment.