From aaa8939b801ad30f5943128b9f17783b5be859b3 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Sun, 22 Nov 2015 12:18:26 +0100 Subject: [PATCH] fix NEP --- src/com/owncloud/android/datamodel/FileDataStorageManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/com/owncloud/android/datamodel/FileDataStorageManager.java b/src/com/owncloud/android/datamodel/FileDataStorageManager.java index cef10bc7..4ce3d42a 100644 --- a/src/com/owncloud/android/datamodel/FileDataStorageManager.java +++ b/src/com/owncloud/android/datamodel/FileDataStorageManager.java @@ -1578,9 +1578,11 @@ public class FileDataStorageManager { } public static void triggerMediaScan(String path) { - Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); - intent.setData(Uri.fromFile(new File(path))); - MainApp.getAppContext().sendBroadcast(intent); + if (path != null) { + Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); + intent.setData(Uri.fromFile(new File(path))); + MainApp.getAppContext().sendBroadcast(intent); + } } public void deleteFileInMediaScan(String path) { -- 2.11.0