You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the scan with the following command line, "electronegativity -i d:<pathToSource>" I received the error "[Error: ENOENT: no such file or directory, stat 'D:...
{
errorno: -4058
code: 'ENOENT'
syscall: 'stat',
path: 'D:\...
}
The problem is not that the file is missing, it is that the DOS path exceeds 256 characters and the folders and file names beyond the 256 limit are not recognized.
To Reproduce
On a Windows 10 Machine create a folder structure that will exceed 256 characters
Check out a project to scan in that folder path.
From the command prompt run the command electronegativity -i <d:\LongPathToProject>
This should reproduce the error.
Expected behavior
Most modern OSs do not have a restriction on the number of character for the filename and folder structure. My expectation was that the scan would have completed and not reported that a file was missing.
**Stacktraces **
See above error message.
Platform (please complete the following information):
OS: [Windows 10]
Electronegativity version: v1.7.0
The text was updated successfully, but these errors were encountered:
Most modern OSs do not have a restriction on the number of character for the filename and folder structure.
Except Windows does and that's where the issue lies. Windows is very much not a "modern" OS as most of it is decades old by this point. Microsoft keeps giving it new coats of paint, but it's still the same old NT codebase underneath, which borrows a lot from DOS. You seem to already know this as you've deduced that it has to do with "DOS paths" being longer than 255 characters.
There is a way to get around "DOS paths". Windows has a method for bypassing the max path length limit by representing paths in a different way (I believe they're called extended paths, or UNC paths, or something like that). However I think electronegativity has to do this manually.
Luckily it's as simple as replacing your boring old C:\Users\Whatever\Documents\Project with \\?\C:\Users\Whatever\Documents\Project as documented here. I believe it might actually work if you pass a path starting with \\?\ to electronegativity.
If that doesn't work, for now you can use WSL which doesn't have such a low path length limit.
EDIT: Interesting, it appears Windows 10 versions later than 1607 have the ability to disable the max path length limitation altogether. That would almost certainly solve the problem on your machine. Actually reading further it seems like this only works for applications that also opt-in to this behavior. Dang.
When running the scan with the following command line, "electronegativity -i d:<pathToSource>" I received the error "[Error: ENOENT: no such file or directory, stat 'D:...
{
errorno: -4058
code: 'ENOENT'
syscall: 'stat',
path: 'D:\...
}
The problem is not that the file is missing, it is that the DOS path exceeds 256 characters and the folders and file names beyond the 256 limit are not recognized.
To Reproduce
Expected behavior
Most modern OSs do not have a restriction on the number of character for the filename and folder structure. My expectation was that the scan would have completed and not reported that a file was missing.
**Stacktraces **
See above error message.
Platform (please complete the following information):
The text was updated successfully, but these errors were encountered: