-
Notifications
You must be signed in to change notification settings - Fork 21
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
Stop gt 255 filenames breaking export #530
Stop gt 255 filenames breaking export #530
Conversation
filename = "#{fn}.#{mime.to_sym}" | ||
filename = fn if mime.to_s == ext_mime.to_s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why'd you swap these two lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
previously those lines explicitly returned the file name. As we're not returning but setting the filename var to use in the string that gets returned at the end, I needed to swap them round so it will set #{fn}.#{mime,to_sym}
everytime and then reset just fn only if the condition is met. There are probably otherways to achieve the same thing, but that's the way I did it.
filename = "#{file_set.id}_#{fn}.#{mime.to_sym}" | ||
filename = "#{file_set.id}_#{fn}" if mime.to_s == ext_mime.to_s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question here as the above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same answer
I don't have perms to add a label, which is the only failing check left |
I can add it for you, which label? |
Thanks Kirk, I was thinking bug-fix? |
Conditionally truncate filenames to stop them going going over 255 chars when they have fileset_ids prepended to them.