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