mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 02:40: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'
|
path = path || './exported'
|
||||||
|
|
||||||
// resolve relative paths...
|
// resolve relative paths...
|
||||||
if(/^(\.\.?[\\\/]|[^\\\/])/.test(path)){
|
if(/^(\.\.?[\\\/]|[^\\\/])/.test(path)
|
||||||
|
// and skip windows drives...
|
||||||
|
&& !/^[a-z]:[\\\/]/i.test(path)){
|
||||||
// XXX do we need to normalize???
|
// XXX do we need to normalize???
|
||||||
path = this.location.path +'/'+ path
|
path = this.location.path +'/'+ path
|
||||||
}
|
}
|
||||||
@ -910,9 +912,11 @@ var FileSystemWriterActions = actions.Actions({
|
|||||||
var base_dir = this.location.path
|
var base_dir = this.location.path
|
||||||
|
|
||||||
// resolve relative paths...
|
// resolve relative paths...
|
||||||
if(/^(\.\.?[\\\/]|[^\\\/])/.test(path)){
|
if(/^(\.\.?[\\\/]|[^\\\/])/.test(path)
|
||||||
|
// and skip windows drives...
|
||||||
|
&& !/^[a-z]:[\\\/]/i.test(path)){
|
||||||
// XXX do we need to normalize???
|
// XXX do we need to normalize???
|
||||||
path = base_dir +'/'+ path
|
path = this.location.path +'/'+ path
|
||||||
}
|
}
|
||||||
|
|
||||||
var to_dir = path
|
var to_dir = path
|
||||||
|
|||||||
@ -103,12 +103,13 @@ function listJSON(path, pattern){
|
|||||||
var denodeify =
|
var denodeify =
|
||||||
module.denodeify =
|
module.denodeify =
|
||||||
function(func){
|
function(func){
|
||||||
|
var that = this
|
||||||
return function(){
|
return function(){
|
||||||
// XXX for some reason this does not see args2array...
|
// XXX for some reason this does not see args2array...
|
||||||
// XXX and for some reason the error is not reported...
|
// XXX and for some reason the error is not reported...
|
||||||
var args = [].slice.call(arguments)
|
var args = [].slice.call(arguments)
|
||||||
return new Promise(function(resolve, reject){
|
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)
|
return err ? reject(err) : resolve(res)
|
||||||
}]))
|
}]))
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user