New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shorten long filenames on import #104
Comments
Still an issue for non-snapshot attachments, and apparently long filenames fail silently. |
Here's a quick thought. Instead of using We would need to modify Thoughts? |
If nsIFile.createUnique really shortens long filenames that would otherwise trigger errors, this sounds good to me. Returning the new nsIFile sounds good. I don't know why that returns the original nsIFile now. |
This fixes the problem for attached files. I assume this is still a problem for importSnapshotFromFile(), which uses copyTo() on a directory. For that we'd need a copyDirectoryToUnique() function that shortened the names of all files in the directory.
@aurimasv: Good find on createUnique(). This seems to work perfectly. |
I was going to test if the shortening works correctly when the supplied file path is URI encoded. I expect that it should work fine, but if it's not, then there's a small chance that an encoded character gets split. I'll check some time later today. |
e.g. http://forums.zotero.org/discussion/23079
The text was updated successfully, but these errors were encountered: