diff options
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/providers/downloads/DownloadThread.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java index c4b6353e..63a51a8f 100644 --- a/src/com/android/providers/downloads/DownloadThread.java +++ b/src/com/android/providers/downloads/DownloadThread.java @@ -315,9 +315,11 @@ public class DownloadThread extends Thread { * Called after a successful completion to take any necessary action on the downloaded file. */ private void finalizeDestinationFile(State state) throws StopRequestException { - // make sure the file is readable - FileUtils.setPermissions(state.mFilename, 0644, -1, -1); - syncDestination(state); + if (state.mFilename != null) { + // make sure the file is readable + FileUtils.setPermissions(state.mFilename, 0644, -1, -1); + syncDestination(state); + } } /** |