mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 22:25:44 +03:00
Merge pull request #6984 from nextcloud/newMediaScannerOnlyWithValidPath
New media scanner: only use with valid path
This commit is contained in:
commit
faad38835e
1 changed files with 1 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue