What is the best way to bypass PATH_MAX (on Linux)?
-
Recently, I filed
bugreports.qt.io/browse/QTBUG-138251
about howQFileSystemModel
is unable to access paths exceeding eitherPATH_MAX
, or an internal limit that corresponds toPATH_MAX
's standard value of 4096 characters.The triage assignee rejected my request, apparently because the method which I'd utilised to bypass it (as an example) was undesirable. I don't understand why the onus is on me to ascertain how best to implement this, but since it is, can anyone assist? I dare say that I'm far past the limitations of my knowledge here.
I'm not referring to Windows'
MAX_PATH
. -
stackoverflow.com/a/7977082
, is promising, because it appears to list some libraries that enqueue requests for descriptors. This should massively reduce how many file descriptors are in use. -
I hate the kind of answer I'm about to give you, because I often have reasons for doing things that don't make sense to others, and I don't feel I should have to justify my reasons when I'm looking for a purely techinical answer...however...
I have to pu it out there...What makes you think you need to stretch a path limit past PATH_MAX in the first place? I'm mean, it's huge to begin with. I'm suggesting that you reevalutate you perceived need to do what you are asking. Sorry.
I really don't think your bug report was rejected for the reason you mention, but probably because the reviewers, like myself, are uncomforable with what you are proposing.
-
@Kent-Dorfman, you're very kind. The initial reason I thought of this was because I've been doing something quite exotic: storing keys and their values in the filename, due to the current unportability of XDG File Attributes, and the fragileness of sidecar files.
However, after seeing a few questions about this on SO, I realised that some alternative, more sensible, albeit identically as niche, reasons existed. Consequently, I put the effort in to attempt to improve their lives alongside mine (although I can easily change what I'm doing unlike, them).
I really don't think your bug report was rejected for the reason you mention, but probably because the reviewers, like myself, are uncomforable with what you are proposing.
Indeed. After enquiring about some specifics, I received a significantly more comprehensive response that provided some reasons I don't think I'll be able to refute about why this is undesirable.
Consequently, consider this post to be mostly separate to that. That report was about negating the need to work around Qt, whereas this thread is how best to work around Qt.
-
Without knowing more about your specific project, my spidey sense tells me that metadata files or a liteweight DB are what you are looking for. Cheers
-
Without knowing more about your specific project, my spidey sense tells me that metadata files or a liteweight DB are what you are looking for. Cheers
@Kent-Dorfman, yeah, it would be if these were part of a program. However, these are my own files manually-created files in my own data drive. Being able to manage them in a Qt-based file manager (like KDE's Dolphin) would be useful.
A human can't feasibly interface with a database for every file transfer, and I don't want to fork Dolphin to add something so niche to it just for me, since that really wouldn't help anyone else.