@@ -109,7 +109,7 @@ protected function loadFile($name)
109109
110110 // get the real file path for the pattern
111111 $ fileName = $ this ->getFileName ($ partialName );
112-
112+ //print $fileName."\n";
113113 // throw error if path is not found
114114 if (!file_exists ($ fileName )) {
115115 throw new Mustache_Exception_UnknownTemplateException ($ name );
@@ -143,29 +143,29 @@ protected function getFileName($name)
143143 {
144144
145145 $ fileName = "" ;
146-
146+ $ dirSep = DIRECTORY_SEPARATOR ;
147147 // test to see what kind of path was supplied
148148 $ posDash = strpos ($ name ,"- " );
149- $ posSlash = strpos ($ name ," / " );
149+ $ posSlash = strpos ($ name ,$ dirSep );
150150 if (($ posSlash === false ) && ($ posDash !== false )) {
151151
152152 list ($ patternType ,$ pattern ) = $ this ->getPatternInfo ($ name );
153153
154154 // see if the pattern is an exact match for patternPaths. if not iterate over patternPaths to find a likely match
155155 if (isset ($ this ->patternPaths [$ patternType ][$ pattern ])) {
156- $ fileName = $ this ->baseDir ." / " .$ this ->patternPaths [$ patternType ][$ pattern ]["patternSrcPath " ];
156+ $ fileName = $ this ->baseDir .$ dirSep .$ this ->patternPaths [$ patternType ][$ pattern ]["patternSrcPath " ];
157157 } else if (isset ($ this ->patternPaths [$ patternType ])) {
158158 foreach ($ this ->patternPaths [$ patternType ] as $ patternMatchKey =>$ patternMatchValue ) {
159159 $ pos = strpos ($ patternMatchKey ,$ pattern );
160160 if ($ pos !== false ) {
161- $ fileName = $ this ->baseDir ." / " .$ patternMatchValue ["patternSrcPath " ];
161+ $ fileName = $ this ->baseDir .$ dirSep .$ patternMatchValue ["patternSrcPath " ];
162162 break ;
163163 }
164164 }
165165 }
166166
167167 } else {
168- $ fileName = $ this ->baseDir ." / " .$ name ;
168+ $ fileName = $ this ->baseDir .$ dirSep .$ name ;
169169 }
170170
171171 if (substr ($ fileName , 0 - strlen ($ this ->extension )) !== $ this ->extension ) {
0 commit comments