Skip to content

Commit

Permalink
Merge pull request #3 from yushiro/master
Browse files Browse the repository at this point in the history
replace invaild characters in filename at windows
  • Loading branch information
Johannes committed Feb 12, 2014
2 parents 9e3fbcf + 784315a commit c63fe3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion SaveLayers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ function saveLayers(ref) {
}

function saveImage(layerName) {
var handle = getUniqueName(prefs.filePath + "/" + layerName);
var fileName = layerName.replace(/[\\\*\/\?:"\|<> ]/g,'');
if(fileName.length ==0) fileName = "autoname";
var handle = getUniqueName(prefs.filePath + "/" + fileName);
prefs.count++;

if(prefs.fileType=="PNG" && prefs.fileQuality=="8") {
Expand Down

0 comments on commit c63fe3b

Please sign in to comment.