very long pathnames and _DirExists (prob ?) - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11) +--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2) +--- Thread: very long pathnames and _DirExists (prob ?) (/showthread.php?tid=2366) |
very long pathnames and _DirExists (prob ?) - doppler - 12-31-2023 Just saying _DirExists does not work with long pathnames won't cut it, so: (a semi-short justification) I collect manga (read into it as comics not from the usual sources). Many languages are used. Among them is Japanese. A very likely encounter is a very long pathname. The Japanese authors tend to name a manga, with a history of it's content. When the kanji romanized title is created it could get long. When a translation group decide to translate (remember it's in Japanese) the manga title maybe English translated to something even longer. example: JP: A very long kanji title how Superman went to the beach with Lois, but meets up Lex Luthor / gang and a big battle ensues. <-- mind you this is long already. would be translated to English as: Eng: Superman is asked to go to the beach by Lois Lane and have a picnic. After they setup, Lex Luthor and is ominous gang show up and fight starts. After long battle Superman wins but asks Luthor to stay and enjoy the picnic. Lex agrees and says he will buy the steaks. This is a silly problem, trans groups should more aware how long the titles get and shorten them. My problem they are stupid and I have a title with a 277 characters long pathname. _DirExists fails on something that long. final note: Why use _DirExists. Simple! To detect special characters (umlauts and such) in directory names. Shell out and capture the directory names. Do a _DirExists on the list. Anything that exists but still can't be tested with _DirExists. Contains special characters. I have to treat them specially different. If you have read to this point you are either. 1) Bored with the New Years weekend. or 2) Really love QB64pe and want it to work correctly. I suspect a little of both. The problem exists on windows. Windows will allow very long pathnames and many sub directories exceeding the 257 character limit. Won't complain until you try to copy or move it. Thanks for reading this far. ps. Newer versions of windows allow longer than 257, the caveat losing backwards compatibility to earlier versions. RE: very long pathnames and _DirExists (prob ?) - SMcNeill - 12-31-2023 The problem is that Windows doesn't support long filenames out of the box. Flags have to be set. Switches flipped. Manual oversight is required. https://www.itprotoday.com/windows-10/enable-long-file-name-support-windows-10 And that's *only* for Windows 10 and above machines. Older versions don't support them at all! And thus the problem, as the libraries we use end up having to be "Vista and above" to work with our product base. They're just not designed for more than 260 characters, and I honestly don't think we'll see that change much until we decide to up the requirements on the language once again. "Well guys, Windows 10 came out 50 years ago. By golly, we should be able to turn up the usage reuirements to at least that far by now..." And, I can even imagine 50 years from now, there'd be half a dozen people who'd cry out, "Oh nos! I haven't updated since Win 3.1! WHY won't you support my OS?!! You're...." Write a language based off technology from 40 years ago, you end up with an user base that still wants to run technology from 40 years ago... RE: very long pathnames and _DirExists (prob ?) - doppler - 12-31-2023 (12-31-2023, 03:11 PM)SMcNeill Wrote: The problem is that Windows doesn't support long filenames out of the box. Flags have to be set. Switches flipped. Manual oversight is required. I expected as much. Not knowing the internals of qb64pe, I knew there had to be a road block somewhere. Why someone needs a path that long is beyond me. I will have to be keep banging at the source of my problem. Nothing that comes easy is worth it. I complain in there forums about this all the time. Nobody gets the point. The manga website uses a UID for mangas. Filenames can be horrendously long, since it's text in a file. With pointers to the UID in the system. Nobody gets bitten by this unless you are an enduser. Saving the chapters. Thanks for the info. |