Skip to content

ENOENT: no such file or directory -4058 - Path exceeds 256 characters #83

Description

@gabrown13

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

  1. On a Windows 10 Machine create a folder structure that will exceed 256 characters
  2. Check out a project to scan in that folder path.
  3. From the command prompt run the command electronegativity -i <d:\LongPathToProject>
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions