Skip to content

Commit

Permalink
fix(TimberDynamicResize): convert path with backslash to slash for up…
Browse files Browse the repository at this point in the history
…loads basedir just as get_home_path() (#299)
  • Loading branch information
harunbleech authored Aug 18, 2020
1 parent d0e7645 commit 789098e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Utils/TimberDynamicResize.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ public static function getDefaultRelativeUploadDir()
$uploadDir = wp_upload_dir();
$homePath = get_home_path();
if (!empty($homePath) && $homePath !== '/') {
$relativeUploadDir = str_replace($homePath, '', $uploadDir['basedir']);
$baseDir = str_replace('\\', '/', $uploadDir['basedir']);
$relativeUploadDir = str_replace($homePath, '', $baseDir);
} else {
$relativeUploadDir = $uploadDir['relative'];
}
Expand Down

0 comments on commit 789098e

Please sign in to comment.