[SOLVED] file name too long

edited 13 days ago
I have Zotero on a Windows system and on a Linux system. Apparently, while using it on Windows, a file with a long name was added - NTFS can handle it, while EXT3 cannot.

Thus, when attempting to synchronize Zotero on my Linux machine, I get this error:

Component returned failure code: 0x80520011 (NS_ERROR_FILE_NAME_TOO_LONG) [nsIFile.create]


What would help:
1. if the error told me exactly what file we're talking about, so I could manually alter it
2. when adding new files to the collection, Zotero could anticipate this and prevent the creation of such file names. Perhaps there could be an advanced setting where a user can indicate the maximum file name length their file system supports.
  • Zotero does limit path and filename lengths on creation (as well as filtering filenames to those valid on any platform), but ultimately it can't know all the factors that might go into determining if a path or filename is too long on a synced computer. (It can be much more complicated than just filename length.)

    It should automatically shorten incoming filenames as necessary on sync, though. Can you provide a Debug ID for a sync that triggers this?

  • Sure, the ID is 526323597, I initially thought it should go into the topic name :-) I ran another sync attempt, yielding another report with the same content, just in case: 631596246

    Thank you for the fast reaction, by the way.

    It is good to know that Zotero employs some logic to prevent that. I will be happy to run other tests and provide additional debug info, if necessary.
  • We need a Debug ID, not a Report ID.
  • Ah, got it. Here is the debug id: D1150970486
  • I peeked into the log myself and if my interpretation is right, it doesn't like this file:
    'Юрьевич and Сергеевич - 2013 - Алгоритмизация прогнозирования времени прибытия па.pdf'

    Its name is 85 symbols long, which doesn't look like a big deal, while the full path, including the directory names, is 120 characters. Maybe it is the Cyrillic nature of the text that makes it problematic?
  • Yeah, filename/path limits are based on bytes, not characters. But the limit for ext3 should be 255 bytes, which that shouldn't be, as least as UTF-8.

    Are you using filesystem encryption?

    Could you try to figure out what the actual limit is for you in that directory? That is, open ~/Zotero/storage/JBRAJBB3/ and try to create a file with just ASCII characters, and see how long you can make it.
  • Hmm, you're right - encryption is involved. I use Linux Mint 19.1, with an encrypted home directory, which I believe uses `ecryptfs`.

    I established empirically that 144 symbols are ok, while 145 symbols yield an error.

  • edited 13 days ago
    OK, we have code to try 143 bytes on Linux for eCryptfs volumes, but I guess that's not working right in your case. I'll take a look.
  • Thank you.
  • Oh, actually, because the eCryptfs check was checking characters, not bytes.

    Can you try the latest Zotero beta to see if that fixes this for you? (There are no other changes since 5.0.73 other than what's hopefully a fix for this.)
  • The beta resolved the problem, thanks!

    Do you need any other logs to confirm any guesses or rule out some hypotheses?
  • No, that's the fix — thanks.
Sign In or Register to comment.