desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Avoid "Failed to open stream: File name too long" by checking filename size locally before upload

Open solracsf opened this issue 3 years ago • 4 comments

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`

solracsf avatar May 11 '23 10:05 solracsf

I agree but I can't understand why not supporting >=250 characters filenames?

KiaraMaker avatar Jun 12 '23 17:06 KiaraMaker

I agree but I can't understand why not supporting >=250 characters filenames?

Common filesystem limitations

szaimen avatar Jun 13 '23 06:06 szaimen

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.

mike0609king avatar Apr 19 '25 14:04 mike0609king

If you've tested like that, it seems it's solved. Closing.

solracsf avatar Apr 19 '25 16:04 solracsf