Skip to content

Commit

Permalink
Fixed absolute path support for Windows [#3297]
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Apr 14, 2021
1 parent 59fb9b2 commit b44a1ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.7.12
## mm/dd/2021

1. [](#bugfix)
* Fixed absolute path support for Windows [#3297](https://github.com/getgrav/grav/issues/3297)

# v1.7.11
## 04/13/2021

Expand Down
6 changes: 3 additions & 3 deletions system/defines.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

// INTERNAL: Do not use!
define('USER_DIR', GRAV_WEBROOT . '/' . GRAV_USER_PATH . '/');
define('CACHE_DIR', (!str_starts_with(GRAV_CACHE_PATH, '/') ? GRAV_ROOT . '/' : '') . GRAV_CACHE_PATH . '/');
define('CACHE_DIR', (!preg_match('`^(/|[a-z]:[\\\/])`ui', GRAV_CACHE_PATH) ? GRAV_ROOT . '/' : '') . GRAV_CACHE_PATH . '/');

// DEPRECATED: Do not use!
define('CACHE_PATH', GRAV_CACHE_PATH . DS);
Expand All @@ -81,10 +81,10 @@
define('DATA_DIR', USER_DIR . 'data/');
define('PLUGINS_DIR', USER_DIR . 'plugins/');
define('THEMES_DIR', USER_DIR . 'themes/');
define('SYSTEM_DIR', (!str_starts_with(GRAV_SYSTEM_PATH, '/') ? GRAV_ROOT . '/' : '') . GRAV_SYSTEM_PATH . '/');
define('SYSTEM_DIR', (!preg_match('`^(/|[a-z]:[\\\/])`ui', GRAV_SYSTEM_PATH) ? GRAV_ROOT . '/' : '') . GRAV_SYSTEM_PATH . '/');
define('LIB_DIR', SYSTEM_DIR . 'src/');
define('VENDOR_DIR', GRAV_ROOT . '/vendor/');
define('LOG_DIR', (!str_starts_with(GRAV_LOG_PATH, '/') ? GRAV_ROOT . '/' : '') . GRAV_LOG_PATH . '/');
define('LOG_DIR', (!preg_match('`^(/|[a-z]:[\\\/])`ui', GRAV_LOG_PATH) ? GRAV_ROOT . '/' : '') . GRAV_LOG_PATH . '/');
// END DEPRECATED

// Some extensions
Expand Down

0 comments on commit b44a1ce

Please sign in to comment.