From: Roan Kattouw Date: Sun, 9 Jan 2011 12:48:30 +0000 (+0000) Subject: Avoid dot bloat in paths X-Git-Tag: 1.31.0-rc.0~32669 X-Git-Url: http://git.cyclocoop.org/clavettes/images/siteon3.jpg?a=commitdiff_plain;h=807526211991a2150bab5bdc562241e8e5ef9e8f;p=lhc%2Fweb%2Fwiklou.git Avoid dot bloat in paths --- diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php index e1b3159708..e17a848264 100644 --- a/includes/resourceloader/ResourceLoaderFileModule.php +++ b/includes/resourceloader/ResourceLoaderFileModule.php @@ -493,8 +493,13 @@ class ResourceLoaderFileModule extends ResourceLoaderModule { if ( $flip ) { $style = CSSJanus::transform( $style, true, false ); } - $dir = $this->getLocalPath( dirname( $path ) ); - $remoteDir = $this->getRemotePath( dirname( $path ) ); + $dirname = dirname( $path ); + if ( $dirname == '.' ) { + // If $path doesn't have a directory component, don't prepend a dot + $dirname = ''; + } + $dir = $this->getLocalPath( $dirname ); + $remoteDir = $this->getRemotePath( $dirname ); // Get and register local file references $this->localFileRefs = array_merge( $this->localFileRefs,