mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 14:55:26 +02:00
fix: Properly surround filename in quotation marks
Signed-off-by: Myzel394 <50424412+Myzel394@users.noreply.github.com>
This commit is contained in:
parent
8cd2fa3b76
commit
73e99afadc
@ -419,11 +419,25 @@ abstract class BatchesFolder(
|
||||
}
|
||||
}
|
||||
|
||||
context.contentResolver.delete(
|
||||
scopedMediaContentUri,
|
||||
"${MediaStore.MediaColumns.DISPLAY_NAME} IN (${deletableNames.joinToString(",")})",
|
||||
null,
|
||||
)
|
||||
try {
|
||||
context.contentResolver.delete(
|
||||
scopedMediaContentUri,
|
||||
"${MediaStore.MediaColumns.DISPLAY_NAME} IN (${
|
||||
deletableNames.joinToString(
|
||||
","
|
||||
) { "'$it'" }
|
||||
})",
|
||||
null,
|
||||
)
|
||||
// This is unfortunate if the files can't be deleted, but let's just
|
||||
// ignore it since we can't do anything about it
|
||||
} catch (e: RuntimeException) {
|
||||
// Probably file not found
|
||||
e.printStackTrace()
|
||||
} catch (e: IllegalArgumentException) {
|
||||
// Strange filename, should not happen
|
||||
e.printStackTrace()
|
||||
}
|
||||
} else {
|
||||
// TODO: Fix "would you like to try saving" -> Save button
|
||||
legacyMediaFolder.listFiles()?.forEach {
|
||||
|
Loading…
x
Reference in New Issue
Block a user