mirror of
https://github.com/jprichardson/node-fs-extra.git
synced 2026-01-25 16:42:57 +00:00
parent
89aeac2e04
commit
0e0fcb88dc
@ -18,6 +18,12 @@ function copySync (src, dest, options) {
|
||||
|
||||
options.filter = options.filter || function () { return true }
|
||||
|
||||
// Warn about using preserveTimestamps on 32-bit node:
|
||||
if (options.preserveTimestamps && process.arch === 'ia32') {
|
||||
console.warn('fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n' +
|
||||
'see https://github.com/jprichardson/node-fs-extra/issues/269')
|
||||
}
|
||||
|
||||
var stats = (options.recursive && !options.dereference) ? fs.lstatSync(src) : fs.statSync(src)
|
||||
var destFolder = path.dirname(dest)
|
||||
var destFolderExists = fs.existsSync(destFolder)
|
||||
|
||||
@ -13,6 +13,12 @@ function copy (src, dest, options, callback) {
|
||||
callback = callback || function () {}
|
||||
options = options || {}
|
||||
|
||||
// Warn about using preserveTimestamps on 32-bit node:
|
||||
if (options.preserveTimestamps && process.arch === 'ia32') {
|
||||
console.warn('fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n' +
|
||||
'see https://github.com/jprichardson/node-fs-extra/issues/269')
|
||||
}
|
||||
|
||||
// don't allow src and dest to be the same
|
||||
var basePath = process.cwd()
|
||||
var currentPath = path.resolve(basePath, src)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user