joyent/node — pull request #2669 by DiogoNeves (2012-02-02 03:49:10+00:00)
Title: Fix fs ENOENT error message

On commands with new_path, if the destination path doesn't exist,
it now prints the error message correctly.

It used to always print the source path even when it existed.

I basically added a check for which path caused the problem, in the `After(req)` callback.
Also added a `new_path` to the `uv_fs_t` structure to keep track of both paths throughout the whole command execution (and after).

I'm also calling the `uv_fs_stat` (in the `After` callback) instead of `stat` directly so that it uses the platform specific code, if any.

This should be a very simple fix but was great to dig a bit around :)

I hope you like, let the questions/suggestions begin! :)