Fixed issue with windows paths in parent field #1699

This commit is contained in:
Andy Miller
2019-06-22 17:24:20 -06:00
parent 06eff3bcf4
commit da2f761aeb
2 changed files with 9 additions and 2 deletions

View File

@@ -2340,8 +2340,9 @@ class AdminController extends AdminBaseController
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 = [