From b01fdbab1b8c21fd66646ce85b7c7172ccd847de Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 21 Sep 2020 13:22:10 +0200 Subject: [PATCH] New media scanner: only use with valid path Signed-off-by: tobiasKaminsky --- .../com/owncloud/android/datamodel/FileDataStorageManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java b/src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java index 5d73e2ebb2..bbfa32c2cb 100644 --- a/src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java +++ b/src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java @@ -1718,7 +1718,7 @@ public class FileDataStorageManager { if (path != null) { ContentValues values = new ContentValues(); ContentResolver contentResolver = MainApp.getAppContext().getContentResolver(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && !TextUtils.isEmpty(path)) { if (file != null) { values.put(MediaStore.Images.Media.MIME_TYPE, file.getMimeType()); values.put(MediaStore.Images.Media.TITLE, file.getFileName());