Hello,

I use this little Code:
            console.log(file.path + ' does: '+fs.existsSync(file.path));
            fs.renameSync(file.path, __dirname+'/public/uploads/' + 
file.name);

The first line says that the file I want to copy exists, but the second 
crashes, because it says that the file would not exist. (I checked it 
myself, it exists!)

Here is the log:
C:\Users\tsc\AppData\Local\Temp\985619c843276d1a16490f8d5b33db1a does: true
Error: ENOENT, no such file or directory 
'C:\Users\tsc\AppData\Local\Temp\985619c843276d1a16490f8d5b33db1a'
    at Object.fs.renameSync (fs.js:439:18)
    at categoriesOfPost (C:\Users\tsc\workspace\NCMS\routes\index.js:434:16)
    at exports.saveCategories 
(C:\Users\tsc\workspace\NCMS\routes\index.js:452:14)
    at callbacks 
(C:\Users\tsc\workspace\NCMS\node_modules\express\lib\router\index.js:161:37)
    at param 
(C:\Users\tsc\workspace\NCMS\node_modules\express\lib\router\index.js:135:11)
    at pass 
(C:\Users\tsc\workspace\NCMS\node_modules\express\lib\router\index.js:142:5)
    at Router._dispatch 
(C:\Users\tsc\workspace\NCMS\node_modules\express\lib\router\index.js:170:5)
    at Object.router 
(C:\Users\tsc\workspace\NCMS\node_modules\express\lib\router\index.js:33:10)
    at next 
(C:\Users\tsc\workspace\NCMS\node_modules\express\node_modules\connect\lib\proto.js:199:15)
    at next 
(C:\Users\tsc\workspace\NCMS\node_modules\express\node_modules\connect\lib\proto.js:201:9)


Why is this?!?!?!

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to