From 04a3cdcecc5bcb89e9c1569b0505efe5aa3666f8 Mon Sep 17 00:00:00 2001 From: ThankVinci Date: Tue, 6 Jul 2021 02:03:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=90=8E=E7=BC=80=E7=9A=84=E4=B8=AD=E6=96=87=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=88=A4=E5=AE=9A=E4=BA=8B=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E9=97=AA=E9=80=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/thankvinci/CloudKey/Files/FileAdapter.java | 8 +++++++- 开发历程.md | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CloudKey/app/src/main/java/com/thankvinci/CloudKey/Files/FileAdapter.java b/CloudKey/app/src/main/java/com/thankvinci/CloudKey/Files/FileAdapter.java index a6022fa..730549c 100644 --- a/CloudKey/app/src/main/java/com/thankvinci/CloudKey/Files/FileAdapter.java +++ b/CloudKey/app/src/main/java/com/thankvinci/CloudKey/Files/FileAdapter.java @@ -75,7 +75,13 @@ public class FileAdapter extends RecyclerView.Adapter { }else{ //Toast.makeText(v.getContext(),fitem.getName()+" "+fitem.isCompress(),Toast.LENGTH_SHORT).show(); String srcFile = builder.toString(); - String desPath = srcFile.substring(0,builder.toString().lastIndexOf(".")); + String desPath; + int lastIndex = builder.toString().lastIndexOf("."); + if(lastIndex == -1){ + desPath = srcFile; + }else { + desPath = srcFile.substring(0,lastIndex); + } if (fitem.isCompress()){ if(FileUtils.isValidZipFile(srcFile)){ UnzipDialogFragment unzipDialog = new UnzipDialogFragment(); diff --git a/开发历程.md b/开发历程.md index 718fbd4..ec9c455 100644 --- a/开发历程.md +++ b/开发历程.md @@ -363,4 +363,8 @@ FileHandler负责将获取到的md5码发到NetThread,然后将得到的密码 **2021/6/24** -修复了当文件名与解压文件夹命名冲突时解压失败的问题 \ No newline at end of file +修复了当文件名与解压文件夹命名冲突时解压失败的问题 + +**2021/7/6** + +修复了没有后缀的中文文件点击判定事件的闪退问题 \ No newline at end of file