From c77338948eaa25b084345021b95962e052ad18d0 Mon Sep 17 00:00:00 2001 From: Kagura Date: Sun, 20 Oct 2024 15:11:23 +0800 Subject: [PATCH] fix: paste --- app/src/main/java/com/dazuoye/filemanager/document_page.kt | 2 +- app/src/main/java/com/dazuoye/filemanager/music_page.kt | 2 +- app/src/main/java/com/dazuoye/filemanager/picture_page.kt | 2 +- app/src/main/java/com/dazuoye/filemanager/video_page.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/dazuoye/filemanager/document_page.kt b/app/src/main/java/com/dazuoye/filemanager/document_page.kt index bb96bb3..765f64a 100644 --- a/app/src/main/java/com/dazuoye/filemanager/document_page.kt +++ b/app/src/main/java/com/dazuoye/filemanager/document_page.kt @@ -170,7 +170,7 @@ class document_page : AppCompatActivity() { } val name = uri.path?.split('/')?.last() ?: "somePastedItem" val ext = name.split('.').last() - if (!"$ext.".matches(regex)) { + if (!".$ext".matches(regex)) { Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT) .show() return@showItemAlert diff --git a/app/src/main/java/com/dazuoye/filemanager/music_page.kt b/app/src/main/java/com/dazuoye/filemanager/music_page.kt index af0ad7d..e9ff0f4 100644 --- a/app/src/main/java/com/dazuoye/filemanager/music_page.kt +++ b/app/src/main/java/com/dazuoye/filemanager/music_page.kt @@ -151,7 +151,7 @@ class music_page : AppCompatActivity() { } val name = uri.path?.split('/')?.last() ?: "somePastedItem" val ext = name.split('.').last() - if (!"$ext.".matches(MusicLister.regex)) { + if (!".$ext".matches(MusicLister.regex)) { Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT) .show() return@showItemAlert diff --git a/app/src/main/java/com/dazuoye/filemanager/picture_page.kt b/app/src/main/java/com/dazuoye/filemanager/picture_page.kt index 380c160..681ee04 100644 --- a/app/src/main/java/com/dazuoye/filemanager/picture_page.kt +++ b/app/src/main/java/com/dazuoye/filemanager/picture_page.kt @@ -152,7 +152,7 @@ class picture_page : AppCompatActivity() { } val name = uri.path?.split('/')?.last() ?: "somePastedItem" val ext = name.split('.').last() - if (!"$ext.".matches(ImageLister.regex)) { + if (!".$ext".matches(ImageLister.regex)) { Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT) .show() return@showItemAlert diff --git a/app/src/main/java/com/dazuoye/filemanager/video_page.kt b/app/src/main/java/com/dazuoye/filemanager/video_page.kt index 8f55882..3ba5407 100644 --- a/app/src/main/java/com/dazuoye/filemanager/video_page.kt +++ b/app/src/main/java/com/dazuoye/filemanager/video_page.kt @@ -151,7 +151,7 @@ class video_page : AppCompatActivity() { } val name = uri.path?.split('/')?.last() ?: "somePastedItem" val ext = name.split('.').last() - if (!"$ext.".matches(VideoLister.regex)) { + if (!".$ext".matches(VideoLister.regex)) { Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT) .show() return@showItemAlert