Avoid "Failed to open stream: File name too long" by checking filename size locally before upload
How to use GitHub
- Please use the 👍 reaction to show that you want to have the same feature implemented.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Feature description
Please check for file name size BEFORE trying to upload it, indefinitely, to the server. So, if file name is >= 250, trow a warning locally and don't try to upload that file.
Error: file_put_contents(/var/www/data/julia/files/Recherche Nextcloud/CEPED_Ikambere/Thèse/Méthodologie recherche Igikali/Réf méthodologie/Approche réaliste/Heidible, 2022. Evaluation of the routine implementation of pulse oximeters into integrated management of childhood illness (IMCI) guidelines at primary health care level in West Africa. the AIRE mixed methods research protocol.pdf.ocTransferId114544620.part): Failed to open stream: File name too long at /var/www/nextcloud/lib/private/Files/Storage/Local.php#300`
I agree but I can't understand why not supporting >=250 characters filenames?
I agree but I can't understand why not supporting >=250 characters filenames?
Common filesystem limitations
Hi, I looked at this issue. As far as I am aware this should already be implemented for lengths > 254. If I try to sync a file that has a filename larger than 254, then it results in a filename too long-error; the file is subsequently excluded. This is implemented before syncing with the server. It is checked in csync_exclude.cpp _csync_excluded_common and called whenever ProcessDirectoryJob::process() is called.
EDIT: What I mean to ask is, whether this is resolved then.
If you've tested like that, it seems it's solved. Closing.