diff --git a/src/unix/fs.c b/src/unix/fs.c index 96670db9..5aa142ac 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -81,16 +81,6 @@ } \ while (0) -#define PATH_STAT_FIXUP \ - do { \ - size_t len; \ - PATH; \ - len = strlen((req)->path); \ - if (len != 0 && (req)->path[len - 1] == '\\') \ - ((char*) (req)->path)[len - 1] = '\0'; /* Windows compatibility... */ \ - } \ - while (0) - #define POST \ do { \ if ((cb) != NULL) \ @@ -474,7 +464,7 @@ int uv_fs_futime(uv_loop_t* loop, int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { INIT(LSTAT); - PATH_STAT_FIXUP; + PATH; POST; } @@ -589,7 +579,7 @@ int uv_fs_sendfile(uv_loop_t* loop, int uv_fs_stat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { INIT(STAT); - PATH_STAT_FIXUP; + PATH; POST; } diff --git a/test/test-fs.c b/test/test-fs.c index 1c2dd509..a6ae9a77 100644 --- a/test/test-fs.c +++ b/test/test-fs.c @@ -794,7 +794,7 @@ TEST_IMPL(fs_async_dir) { ASSERT(r == 0); uv_run(loop); - r = uv_fs_stat(loop, &stat_req, "test_dir\\", stat_cb); + r = uv_fs_stat(loop, &stat_req, "test_dir/", stat_cb); ASSERT(r == 0); uv_run(loop); @@ -802,7 +802,7 @@ TEST_IMPL(fs_async_dir) { ASSERT(r == 0); uv_run(loop); - r = uv_fs_lstat(loop, &stat_req, "test_dir\\", stat_cb); + r = uv_fs_lstat(loop, &stat_req, "test_dir/", stat_cb); ASSERT(r == 0); uv_run(loop);