mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
found a bug (fixed) that triggered a bug in fs-extra (pending: https://github.com/jprichardson/node-fs-extra/issues/237)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0e87a44b3c
commit
4f7156c8a9
@ -811,7 +811,9 @@ var FileSystemWriterActions = actions.Actions({
|
||||
path = path || './exported'
|
||||
|
||||
// resolve relative paths...
|
||||
if(/^(\.\.?[\\\/]|[^\\\/])/.test(path)){
|
||||
if(/^(\.\.?[\\\/]|[^\\\/])/.test(path)
|
||||
// and skip windows drives...
|
||||
&& !/^[a-z]:[\\\/]/i.test(path)){
|
||||
// XXX do we need to normalize???
|
||||
path = this.location.path +'/'+ path
|
||||
}
|
||||
@ -910,9 +912,11 @@ var FileSystemWriterActions = actions.Actions({
|
||||
var base_dir = this.location.path
|
||||
|
||||
// resolve relative paths...
|
||||
if(/^(\.\.?[\\\/]|[^\\\/])/.test(path)){
|
||||
if(/^(\.\.?[\\\/]|[^\\\/])/.test(path)
|
||||
// and skip windows drives...
|
||||
&& !/^[a-z]:[\\\/]/i.test(path)){
|
||||
// XXX do we need to normalize???
|
||||
path = base_dir +'/'+ path
|
||||
path = this.location.path +'/'+ path
|
||||
}
|
||||
|
||||
var to_dir = path
|
||||
|
||||
@ -103,12 +103,13 @@ function listJSON(path, pattern){
|
||||
var denodeify =
|
||||
module.denodeify =
|
||||
function(func){
|
||||
var that = this
|
||||
return function(){
|
||||
// XXX for some reason this does not see args2array...
|
||||
// XXX and for some reason the error is not reported...
|
||||
var args = [].slice.call(arguments)
|
||||
return new Promise(function(resolve, reject){
|
||||
func.apply(null, args.concat([function(err, res){
|
||||
func.apply(that, args.concat([function(err, res){
|
||||
return err ? reject(err) : resolve(res)
|
||||
}]))
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user