Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect fs case sensitivity based on it's real behavior #200

Closed
koroandr opened this issue Oct 3, 2016 · 2 comments
Closed

Detect fs case sensitivity based on it's real behavior #200

koroandr opened this issue Oct 3, 2016 · 2 comments
Labels

Comments

@koroandr
Copy link

koroandr commented Oct 3, 2016

In lib/Host.js there is such line (134):

    Host.prototype.useCaseSensitiveFileNames = function () {
        var platform = os.platform();
        return platform !== 'win32' && platform !== 'win64' && platform !== 'darwin';
    };

It detects case-sensitivity based on platform name, which is considered a bad practice.

I am working on Mac OS system with case-sensitive file system, so the following code

    Host.prototype.getCanonicalFileName = function (filename) {
        return ts.normalizeSlashes(ts.sys.useCaseSensitiveFileNames ? filename : filename.toLowerCase());
    };

breaks my paths.

I also created similar issue in TypeScript project.

@cartant cartant added the bug label Oct 3, 2016
@cartant
Copy link
Contributor

cartant commented Oct 3, 2016

That all sounds pretty reasonable. I'll look into it tomorrow. Thanks.

@koroandr
Copy link
Author

koroandr commented Oct 3, 2016

I actually already did a quick fix for that - #201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants