-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
files without extensions make troubles #6461
Comments
Then we have to decide whether to keep everything after the leftmost point or everything after the rightmost point. I.e. for archive.tar.xz, do we keep .xz or .tar.xz, and for document.version8.1.pdf, do we keep .pdf or .version8.1.pdf. Today's code does it differently in different places - Pro leftmost point (plus heuristics like in
Pro righmost point:
|
this seems sufficient for the things that come to mind, so esp. the "internal or external viewer". it is also what was done in the past and there were no issues with that. if it is easier to do, and has less cornercases, that sounds even more reasonable :) |
I would prefer the rightmost part and no heuristics if we don't need to deal with .tar.gz on iOS. So for received .tar.gz. files they will be stored in |
Both approaches were taken in different parts of the code.
There were, so we made the heuristics more complicated to cover more cases, e.g. #6364
For core, the easier and more straightforward thing to do would be to use the rightmost point, because there are no heuristics which we may have to change in the future. The cornercases when using the rightmost point might be in the UIs, but it depends on how exactly the UIs do things - I can only say that on Android, there wouldn't be any problems. I'm not against using the leftmost+heuristics, but I do tend to agree with @link2xt and go for rightmost. |
no, it should be fine for iOS, i am not aware of the preview supporting any of these "double extension file types" so, if it is simpler i am also for rightmost :) |
the file deduplication from #6265 and #6332 removed all extensions from newly created files.
this causes issues when passing files to the system on iOS, it just does not work.
in both cases, the system only takes a file name (a "url") - and the detection of the file type seem at least partly rely on the extension. if not given, nothing is displayed. see deltachat/deltachat-ios#2524 for system-API links
the only alternative i see, is to copy the file to a temporary file with the correct extension, but that seems to be a waste of power and space, esp. for larger files or slower devices. not to speak of added complexity.
but even if we go that way or find another solution: i have a strong gut feeling that the total removal of extensions is a thing that will bite us also elsewhere, windows (that is much more extension centric than unix), external video player, debugging, whatever.
all other parts, on iOS, work nicely so far, so only displaying not the blob-filename but the real-filename
as the removal of the extension seemed to be also kind of experiment, and @Hocuri already offered to get them back, i think, we should go for that.
The text was updated successfully, but these errors were encountered: