mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Safeguard findUniqueFilename from race conditions
This might partially, but not fully, solve Issue #228 (accidental overwriting).
This commit is contained in:
parent
1bdcf3fda0
commit
0714f6ec93
1 changed files with 1 additions and 1 deletions
|
|
@ -284,7 +284,7 @@ public class UploadService extends HandlerService<Contribution> {
|
|||
contribution.save();
|
||||
}
|
||||
|
||||
private String findUniqueFilename(String fileName) throws IOException {
|
||||
synchronized private String findUniqueFilename(String fileName) throws IOException {
|
||||
return findUniqueFilename(fileName, 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue