Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Windows.h defines MAX_PATH as 260.

Many apps do something like

char path[MAX_PATH]

In that case, no amount of prefixing will help you, if random app enforces the limit.



"no amount of prefixing will help you, if random app enforces the limit"

I've noticed that, it's partially the reason for my confusion (I didn't wake up for quite a while as I put it down to the different versions of Windows I was running on various machines). Other pains are caused by apps that still don't run Unicode and crash or stop copying when they encounter a non-ASCII character.


Yeah, old ones using raw Win32 calls, where developers haven't read anything beyond Petzold's book.


So is the limit 259 characters plus a null?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: