Skip to content
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

Use Message.file_name as the proposed filename in Save As dialog rather than the source basename #3330

Closed
link2xt opened this issue Jul 25, 2023 · 3 comments · Fixed by #3344

Comments

@link2xt
Copy link
Collaborator

link2xt commented Jul 25, 2023

Currently the source basename is used as a proposed filename for save as dialog:

defaultPath: join(base_path, basename(source)),

This is usually a mangled filename like store-890578782.xdc if the file with this filename was shared more than once, and there is a plan to use completely random filenames or hashes for the blobs stored in the blobdir: deltachat/deltachat-core-rust#4309

If Desktop uses Message.file_name instead, a single core change will improve the Save As dialog so right-clicking a media file and selecting Save As will always open the dialog with a store.xdc proposed name instead.

@farooqkz
Copy link
Collaborator

if the file with this filename was shared more than once

Can you please elaborate? Like if I forward the file from a group to another one?

@farooqkz
Copy link
Collaborator

Explanation from @Simon-Laux :

sending the same file in multiple chats without using forward will alter the filename, core wants to change that in the future so desktop should be ready for it or sth like that

@link2xt
Copy link
Collaborator Author

link2xt commented Jul 31, 2023

dc_msg_get_filename() and Message.file_name are not even new APIs, Desktop could have used them from the beginning instead of using basename() on a file path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants