abagshaw/brackets-minifier

Variable concatSavePath is returning a duplicate path

GastonZalba opened this issue · 1 comments

Hi. First, thanks for the extension, its very useful, and sorry for my english... I think, i found an error. The file main.js, line 186, is: concatSavePath = FileUtils.convertToNativePath(stripSlashes(mainProjectPath).concat("/").concat(stripSlashes(prefs.get("css-custom-path"))).concat("/").concat(stripSlashes(prefs.get("concat-css-filename"))).concat(".css"));

The problem is when you save with concatenate ON and in a custom directory, because the variable concatSavePath is returning a duplicate path: the mainProjectPath and the css-custom-path. Ex: C:\project\SourceOfMyBracketsProjectC:\project\MyCustomDirectory.

That line should be: concatSavePath = FileUtils.convertToNativePath(stripSlashes(prefs.get("css-custom-path")).concat("/").concat(stripSlashes(prefs.get("concat-css-filename"))).concat(".css")); . Otherwise, on saving, always returns error... I did that change and now the file is writing perfect!

regards!
Gastón

@tatoz12 Good catch! The paths were not being resolved properly. Please try the new version (3.0.0) and let me know if the problem persists.