Bladeren bron

【三坐标检测】返回文件名

lxb 2 jaren geleden
bovenliggende
commit
98b63c7e6b

+ 3 - 3
imcs-admin-boot/imcs-common/src/main/java/com/github/zuihou/common/util/SmbShareFileUtil.java

@@ -323,7 +323,7 @@ public class SmbShareFileUtil {
      */
     public static String findNewMeasuringFiles(String ip, String userName, String password, String url){
         NtlmPasswordAuthentication auth =new NtlmPasswordAuthentication(ip, userName, password);
-        String returnFilePath = "";
+        String returnFileName = "";
         SmbFile file = null;
         try {
             file = new SmbFile(url,auth);
@@ -347,13 +347,13 @@ public class SmbShareFileUtil {
                         return 0;
                     })).findFirst().get();
 
-                    returnFilePath =  smbFile.getPath();
+                    returnFileName =  smbFile.getName();
                 }
             }
         } catch (Exception e) {
             e.printStackTrace();
         }
-        return returnFilePath;
+        return returnFileName;
     }