Failure to compile file names with backslashes #2466

Closed
attilaolah opened this Issue Jul 27, 2012 · 3 comments

Projects

None yet

2 participants

@attilaolah

To reproduce this, run:

$ mkdir foo
$ touch foo/\\
$ coffee foo

It gives the following error:

/home/aatiis/repos/coffee-script/lib/coffee-script/command.js:116
            throw err;
                  ^
Error: ENOTDIR, readdir 'foo\'
@attilaolah

Another test case:

$ mkdir -p test/app
$ touch test/app/\\ test/app.coffee
$ coffee --compile --watch test

This can be particularly annoying as I tend to generate files with the name \ sometimes when instead of typing :w<Return> I hit :w\<Return> because the backslash is close to the enter key on my keyboard.

@attilaolah

Digging around a bit reveals that the fs.stat() function incorrectly identifies the backslash-file as a directory (stats.isDirectory() returns true, while stats.isFile() returns false).

Seems to me like a node.js bug (I have version 0.8.3 on my Gentoo system).

@attilaolah

Cannot be reproduced with node.js version 0.9.9 and CoffeeScript 1.5.0.

@attilaolah attilaolah closed this Mar 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment