barsh / true-case-path Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
pass in C:\Users
vs c:\Users
. In the second case the c
is not made upper case
As I've said in a comment on my stackoverflow.com answer where you got the code from:
It's great that you've packaged it for npm
, but you need to give proper attribution:
README.md
contributors
key in package.json
If this were a one-liner, I wouldn't ask for this, but given that the entire functionality of your package is my code verbatim, and the contents of your read-me are the comments from my code verbatim, I think it's only fair that you publicly acknowledge where it came from.
On windows, if path contains ( ,], *, etc, trueCasePathSync method returns undefined.
The root cause is glob.sync recognize these chars as magic ones. It seems no options to disable the magic char []
๐
Gatsby started using this project in a recent release and unfortunately it lead to a new bug (gatsbyjs/gatsby#12005 (comment)) I've dug a bit deeper and found that it is caused by this line:
Line 16 in a162300
HFS+ is no longer the default file system for newer Macs and with High Sierra they even upgraded HFS+ systems to APFS if the computer is using a SSD.
APFS seems to not store things with NFD anymore, but if we try to normalize the path, glob
will return an empty array for the normalized path. If we remove that line, everything works as expected.
Unfortunately I don't have any old mac with HFS anymore, so I can't test it out right now, but what do you think the best way going forward would be?
There's also #8 lingering around, which I have yet to try.
Thanks for reading this and have a great day :)
I'm using shared hosting, so I don't have access to anything outside my home folder.
Is it possible to fix this issue, without accessing anything outside home folder?
/usr/home/spider/hello_phoenix/node_modules/true-case-path/node_modules/glob/sync.js:321
throw er
^
โ
Error: EACCES: permission denied, scandir '/'
at Object.fs.readdirSync (fs.js:914:18)
at GlobSync._readdir (/usr/home/spider/hello_phoenix/node_modules/true-case-path/node_modules/glob/sync.js:275:41)
at GlobSync._processReaddir (/usr/home/spider/hello_phoenix/node_modules/true-case-path/node_modules/glob/sync.js:135:22)
at GlobSync._process (/usr/home/spider/hello_phoenix/node_modules/true-case-path/node_modules/glob/sync.js:130:10)
at new GlobSync (/usr/home/spider/hello_phoenix/node_modules/true-case-path/node_modules/glob/sync.js:46:10)
at Function.globSync [as sync] (/usr/home/spider/hello_phoenix/node_modules/true-case-path/node_modules/glob/sync.js:24:10)
at trueCasePathSync (/usr/home/spider/hello_phoenix/node_modules/true-case-path/index.js:29:15)
at trueCasePath
Example: \\vmware-host\Shared Folders\SomeFolder\Somefile.txt
which exists just hangs when calling trueCasePathSync
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.