mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
removed dependency on fswin (did not work out of the box on nw) and now the hidden flag is set via spawning attrib...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
9618ffeab5
commit
82e10ff27e
@ -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
|
||||
|
||||
@ -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": "*",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user