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

fix: Fix media backup bug #285

Merged
merged 5 commits into from
Aug 5, 2024

Conversation

FiberStudio
Copy link
Contributor

修复“备份文件”功能下,当选择的文件目录filename重复时,备份出错的bug。
fix the bug in mediumBackupUtil casued by dealing with the duplicate filename(extract from the filepath)

bug 说明:
当选择的备份文件夹的名称和已有的文件夹名称一致时,程序会自动给获取到的filename加上_编号做去重处理后存到MediaIndexInfo.name;但是在备份的时候使用MediaIndexInfo.name作为源文件的文件名就不合适了,因为MediaIndexInfo.name不一定是原来的文件名了(在文件目录filename重复时一定不是)
2024-08-04_164736

修复说明:
在备份时从原始路径重新获取文件名而不是直接使用MediaEntity.name(也就是MediaIndexInfo.name)。

测试:
在修改后,编译了alpha版本的apk测试了一下,数据备份不再报错。
数据恢复功能也正常(恢复的时候文件名没有问题)

感谢lead maintainer XayahSuSuSu在actions配置方面给予的帮助。我不是程序员,所以请验证后再合并到主分支中。希望对本项目能有帮助,谢谢。

try to fix duplicated filename error when back up media files
we should pick uo the filename out of src rather than using src directly
@FiberStudio FiberStudio changed the title Fix media backup bug fix: Fix media backup bug Aug 4, 2024
@XayahSuSuSu XayahSuSuSu merged commit 6c11e12 into XayahSuSuSu:main Aug 5, 2024
1 check passed
@XayahSuSuSu
Copy link
Owner

感谢:)

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 this pull request may close these issues.

2 participants