X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/38ca813a0e312e2768e5b9519f0415cd0aa84781..cd3609994b39a094ff7528b93f55631bb213fd7f:/wp-admin/includes/class-wp-filesystem-base.php diff --git a/wp-admin/includes/class-wp-filesystem-base.php b/wp-admin/includes/class-wp-filesystem-base.php index fd3fdc33..1f22f241 100644 --- a/wp-admin/includes/class-wp-filesystem-base.php +++ b/wp-admin/includes/class-wp-filesystem-base.php @@ -153,12 +153,12 @@ class WP_Filesystem_Base { if ( defined($constant) && $folder === $dir ) return trailingslashit(constant($constant)); } elseif ( 'direct' == $this->method ) { - $folder = str_replace('\\', '/', $folder); //Windows path sanitiation + $folder = str_replace('\\', '/', $folder); //Windows path sanitisation return trailingslashit($folder); } - $folder = preg_replace('|^([a-z]{1}):|i', '', $folder); //Strip out windows driveletter if its there. - $folder = str_replace('\\', '/', $folder); //Windows path sanitiation + $folder = preg_replace('|^([a-z]{1}):|i', '', $folder); //Strip out windows drive letter if it's there. + $folder = str_replace('\\', '/', $folder); //Windows path sanitisation if ( isset($this->cache[ $folder ] ) ) return $this->cache[ $folder ]; @@ -223,7 +223,7 @@ class WP_Filesystem_Base { } if ( $loop ) return false; //Prevent this function from looping again. - //As an extra last resort, Change back to / if the folder wasnt found. This comes into effect when the CWD is /home/user/ but WP is at /var/www/.... mainly dedicated setups. + //As an extra last resort, Change back to / if the folder wasn't found. This comes into effect when the CWD is /home/user/ but WP is at /var/www/.... mainly dedicated setups. return $this->search_for_folder($folder, '/', true); } @@ -328,5 +328,3 @@ class WP_Filesystem_Base { return (bool) preg_match('|[^\x20-\x7E]|', $text); //chr(32)..chr(127) } } - -?>