| Previous | Next |
| EL2NSYNC | ENOTEMPTY |
ENAMETOOLONG
ENAMETOOLONG means the pathname supplied to the relevant C-runtime or portability-layer operation exceeds a limit that the operation can accept. It is not safe to diagnose it from the final filename alone: the complete path, its individual components, the filesystem, the API family, and the path syntax all matter.
Windows has several overlapping path rules. Legacy APIs can encounter MAX_PATH-related limits, while Unicode extended-length paths can use a different form and filesystem components may impose separate limits. A path that is acceptable to one API or filesystem can still fail in an older library, a shell-facing workflow, a relative-path call, or an archive extraction step.
What to capture
- Log the complete path length, each component length, whether it is relative, drive-based, UNC, or extended-length, and which API accepted the input.
- Do not truncate a path silently: truncation can redirect an operation to a different object or create collisions.
- Check the target filesystem and deployment location, especially when a build, Git checkout, package extractor, or sync client adds nested directories.
- Use the documented Unicode API and long-path model deliberately; adding a prefix changes parsing rules and is not a universal string substitution.
References
- Microsoft: errno constants
- Microsoft: naming files, paths, and namespaces
- Microsoft: maximum path length limitation
Looking for a different code? Search another status or error code.