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

WIP: Fix saving files with the same names #1812

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dsatyanov
Copy link

@dsatyanov dsatyanov commented May 18, 2024

@dkaraush Do you remember or could you help with understanding why do we need this removed code here?
For me it looks like speed boost/optimization because we don't touch FilePathDatabase in this case - is it correct?

Because of the code there is the bug in the app:
https://bugs.telegram.org/c/35162
https://bugs.telegram.org/c/32951
when there is more than one file with the same name we could "save to downloads" only the first of the cached files, because other files are saved internally with suffix " (number)" (see FileLoadOperation)

So it seems like we have to get file path from FilePathDatabase, where the file path is saved properly (see putPath) - is it correct?

@Aokromes
Copy link

imho, if you want to stop using some code better remove it, don't comment it.

@dsatyanov
Copy link
Author

dsatyanov commented May 31, 2024

better remove it, don't comment it

Agree 100%
It's not the final fix it's just to highlight the cause of the bug.
But yes - now I see that I could just remove the code and we'd still see it

Update: removed the code instead of commenting it

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