digitalmars.D.learn - dealing with very long paths and names
- Josphe Brigmo (4/4) Sep 14 2018 Seems to break dirEntries when trying to deal with long
- Basile B. (3/7) Sep 14 2018 The bug is known, see
- H. S. Teoh (6/14) Sep 14 2018 Whoa. After seeing the insane mess that is the Windows pathname syntax,
- Kagamin (2/4) Sep 17 2018 Yeah, also SIGPIPE, EINTR and "fork should be fast enough".
- Jonathan M Davis (8/19) Sep 14 2018 learn wrote:
- Vladimir Panteleev (11/16) Sep 15 2018 Linux generally allows you to go ahead and use the filesystem as
- Jonathan M Davis (21/37) Sep 15 2018 Oh, I don't disagree. I think that in general it makes _way_ more sense ...
Seems to break dirEntries when trying to deal with long pathnames(> 512) on windows. It's a strange error because it just fails with access denied or missing file.
Sep 14 2018
On Friday, 14 September 2018 at 17:59:38 UTC, Josphe Brigmo wrote:Seems to break dirEntries when trying to deal with long pathnames(> 512) on windows. It's a strange error because it just fails with access denied or missing file.The bug is known, see https://issues.dlang.org/show_bug.cgi?id=8967
Sep 14 2018
On Fri, Sep 14, 2018 at 07:05:35PM +0000, Basile B. via Digitalmars-d-learn wrote:On Friday, 14 September 2018 at 17:59:38 UTC, Josphe Brigmo wrote:Whoa. After seeing the insane mess that is the Windows pathname syntax, I'm so glad I code on Linux instead! T -- Only boring people get bored. -- JMSeems to break dirEntries when trying to deal with long pathnames(> 512) on windows. It's a strange error because it just fails with access denied or missing file.The bug is known, see https://issues.dlang.org/show_bug.cgi?id=8967
Sep 14 2018
On Friday, 14 September 2018 at 20:52:42 UTC, H. S. Teoh wrote:Whoa. After seeing the insane mess that is the Windows pathname syntax, I'm so glad I code on Linux instead!Yeah, also SIGPIPE, EINTR and "fork should be fast enough".
Sep 17 2018
On Friday, September 14, 2018 2:52:42 PM MDT H. S. Teoh via Digitalmars-d- learn wrote:On Fri, Sep 14, 2018 at 07:05:35PM +0000, Basile B. via Digitalmars-d-learn wrote:Yeah, though if you write cross-platform applications or libraries (and ideally, most applications and libraries would be platform-agnostic), you can't necessarily avoid all of the Windows insanity, even if you yourself use a platform without those problems. - Jonathan M DavisOn Friday, 14 September 2018 at 17:59:38 UTC, Josphe Brigmo wrote:Whoa. After seeing the insane mess that is the Windows pathname syntax, I'm so glad I code on Linux instead!Seems to break dirEntries when trying to deal with long pathnames(> 512) on windows. It's a strange error because it just fails with access denied or missing file.The bug is known, see https://issues.dlang.org/show_bug.cgi?id=8967
Sep 14 2018
On Friday, 14 September 2018 at 21:16:31 UTC, Jonathan M Davis wrote:Yeah, though if you write cross-platform applications or libraries (and ideally, most applications and libraries would be platform-agnostic), you can't necessarily avoid all of the Windows insanity, even if you yourself use a platform without those problems.Linux generally allows you to go ahead and use the filesystem as a database, and this works pretty well in a lot of cases. Filesystem performance is much better, and so are the limitations - not just the path length as discussed in this thread, but also the range of valid characters (anything except / and NUL is fine). Plus, depending on your choice of filesystem, you get bonus features like snapshots, incremental backups, and deduplication. It's a boon for prototyping (or Linux-only software).
Sep 15 2018
On Saturday, September 15, 2018 8:45:55 AM MDT Vladimir Panteleev via Digitalmars-d-learn wrote:On Friday, 14 September 2018 at 21:16:31 UTC, Jonathan M Davis wrote:Oh, I don't disagree. I think that in general it makes _way_ more sense to use a *nix system for development (or most anything else) even if the software can run on multiple platforms. And actually, the primary reason that I use the OS I do (FreeBSD) is because of the filesystem (it has first class ZFS support unlike Linux). However, I'm a strong believer that in general, software should be cross-platform if it reasonably can be. That's usually the worst when folks use all kinds of Windows-specific stuff when they don't need to, but sometimes, Linux-isms do creep into code unnecessarily. Either way, while I've occasionally found something that Windows did better than *nix, far more often, it's shocking how bad their APIs are. And in this particular case, there really isn't a great solution. Trying to hide the Windows limitations by translating longer paths so that the Windows API is risky business, but leaving it up to the programmer to run into it and then scream in frustration like the OP is isn't great either. And of course, even if they outright fixed the problem in Windows tomorrow, it would probably be over a decade before you could rely on it given how long people use older versions of Windows. - Jonathan M DavisYeah, though if you write cross-platform applications or libraries (and ideally, most applications and libraries would be platform-agnostic), you can't necessarily avoid all of the Windows insanity, even if you yourself use a platform without those problems.Linux generally allows you to go ahead and use the filesystem as a database, and this works pretty well in a lot of cases. Filesystem performance is much better, and so are the limitations - not just the path length as discussed in this thread, but also the range of valid characters (anything except / and NUL is fine). Plus, depending on your choice of filesystem, you get bonus features like snapshots, incremental backups, and deduplication. It's a boon for prototyping (or Linux-only software).
Sep 15 2018