diff --git a/ui (gen4)/features/filesystem.js b/ui (gen4)/features/filesystem.js index b58d8a8a..1ff7383a 100755 --- a/ui (gen4)/features/filesystem.js +++ b/ui (gen4)/features/filesystem.js @@ -11,17 +11,11 @@ define(function(require){ var module = {} // XXX this should not be imported!!! // ...something wrong with requirejs(..) if(typeof(process) != 'undefined'){ + var child_process = requirejs('child_process') var fse = requirejs('fs-extra') var pathlib = requirejs('path') var glob = requirejs('glob') - // Windows specific stuff... - try{ - var fswin = requirejs('fswin') - }catch(err){ - var fswin = null - } - var file = require('imagegrid/file') } @@ -1450,9 +1444,10 @@ var FileSystemWriterActions = actions.Actions({ this.config['index-filename-template'], logger) .then(function(){ - fswin && fswin.setAttributeSync(full_path, { - IS_HIDDEN: true, - }) + typeof(process) != 'undefined' + && process.platform == 'win32' + && child_process + .spawn('attrib', ['+h', full_path]) }) .then(function(){ location.method = 'loadIndex' @@ -1591,16 +1586,14 @@ var FileSystemWriterActions = actions.Actions({ this.config['index-filename-template'], logger || this.logger) .then(function(){ - fswin && fswin.setAttributeSync(index_path, { - IS_HIDDEN: true, - }) + typeof(process) != 'undefined' + && process.platform == 'win32' + // XXX do we need to quote path??? + && child_process + .spawn('attrib', ['+h', index_path]) })) - return Promise.all(queue) - .then(function(){ - return that.location - }) }], // XXX might also be good to save/load the export options to .ImageGrid-export.json diff --git a/ui (gen4)/package.json b/ui (gen4)/package.json index 406d6fd0..27e4dc70 100755 --- a/ui (gen4)/package.json +++ b/ui (gen4)/package.json @@ -19,7 +19,6 @@ "app-module-path": "^1.0.6", "commander": "^2.9.0", "exiftool": "^0.0.3", - "flickrapi": "^0.3.28", "fs-extra": "*", "fs-walk": "^0.0.1", "glob": "^4.0.6", @@ -29,7 +28,7 @@ "sharp": "^0.12.0" }, "optionalDependencies": { - "fswin": "*" + "flickrapi": "^0.3.28", }, "devDependencies": { "less": "*",