What does errno 38 (ENAMETOOLONG) mean?

 
Could be also:
ConstantTypeOS
ERROR_HANDLE_EOFWin32 errorWindows
KERN_LOCK_SET_DESTROYEDKern returnMac
ippStsSymKernelExpectedIntel Ipp StatusAny
ENOSYSerrnoLinux
ENOTSOCKerrnoMac
EL2NSYNCerrnoSolaris
CDFS_FILE_SYSTEMBugCheck CodeWindows
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


Looking for a different code? Search another status or error code.