3131define ( function ( require , exports , module ) {
3232 "use strict" ;
3333
34+ var FileSystem = require ( "filesystem/FileSystem" ) ;
35+
3436 /**
3537 * Appends a <style> tag to the document's head.
3638 *
@@ -66,6 +68,18 @@ define(function (require, exports, module) {
6668 return $link [ 0 ] ;
6769 }
6870
71+ /**
72+ * getModuleUrl returns different urls for win platform
73+ * so that's why we need a different check here
74+ * @see getModuleUrl()
75+ * @param {!string } pathOrUrl that should be checked if it's absolute
76+ * @return {!boolean } returns true if pathOrUrl is absolute url on win platform
77+ * or when it's absolute path on other platforms
78+ */
79+ function isAbsolutePathOrUrl ( pathOrUrl ) {
80+ return brackets . platform === "win" ? PathUtils . isAbsoluteUrl ( pathOrUrl ) : FileSystem . isAbsolutePath ( pathOrUrl ) ;
81+ }
82+
6983 /**
7084 * Parses LESS code and returns a promise that resolves with plain CSS code.
7185 *
@@ -91,7 +105,7 @@ define(function (require, exports, module) {
91105 rootpath : dir
92106 } ;
93107
94- if ( PathUtils . isAbsoluteUrl ( url ) ) {
108+ if ( isAbsolutePathOrUrl ( url ) ) {
95109 options . currentFileInfo = {
96110 currentDirectory : dir ,
97111 entryPath : dir ,
@@ -161,7 +175,7 @@ define(function (require, exports, module) {
161175 * @return {!$.Promise } A promise object that is resolved with the contents of the requested file
162176 **/
163177 function loadFile ( module , path ) {
164- var url = PathUtils . isAbsoluteUrl ( path ) ? path : getModuleUrl ( module , path ) ,
178+ var url = isAbsolutePathOrUrl ( path ) ? path : getModuleUrl ( module , path ) ,
165179 promise = $ . get ( url ) ;
166180
167181 return promise ;
0 commit comments