summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/downloads/Helpers.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/providers/downloads/Helpers.java')
-rw-r--r--src/com/android/providers/downloads/Helpers.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/providers/downloads/Helpers.java b/src/com/android/providers/downloads/Helpers.java
index 225b8d49..059e9703 100644
--- a/src/com/android/providers/downloads/Helpers.java
+++ b/src/com/android/providers/downloads/Helpers.java
@@ -284,6 +284,9 @@ public class Helpers {
private static String chooseUniqueFilename(int destination, String filename,
String extension, boolean recoveryDir) throws StopRequestException {
+ // TODO: switch to actually creating the file here, otherwise we expose
+ // ourselves to race conditions.
+
String fullFilename = filename + extension;
if (!new File(fullFilename).exists()
&& (!recoveryDir ||