Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
修复“备份文件”功能下,当选择的文件目录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重复时一定不是)
修复说明:
在备份时从原始路径重新获取文件名而不是直接使用MediaEntity.name(也就是MediaIndexInfo.name)。
测试:
在修改后,编译了alpha版本的apk测试了一下,数据备份不再报错。
数据恢复功能也正常(恢复的时候文件名没有问题)
感谢lead maintainer XayahSuSuSu在actions配置方面给予的帮助。我不是程序员,所以请验证后再合并到主分支中。希望对本项目能有帮助,谢谢。