Fix: delete empty directory after deleting contents

This commit is contained in:
Tomasz Klim
2025-06-20 13:47:58 +02:00
committed by GitHub
parent a54fd13bc4
commit 047c14a06a

View File

@@ -160,6 +160,7 @@ public class InnerDocumentsProvider extends android.provider.DocumentsProvider{
if(!dir.delete()) {
throw new FileNotFoundException("Failed to delete directory with id " + dir.getPath());
}
}
@Override
public void deleteDocument(String documentId) throws FileNotFoundException {
File file = getFileForDocId(documentId);
@@ -293,4 +294,4 @@ public class InnerDocumentsProvider extends android.provider.DocumentsProvider{
row.add(Document.COLUMN_ICON, R.drawable.app_icon);
}
}
}