From 728ed21a80c815f3577d37e516655d171453590f Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 6 Sep 2021 11:39:10 -0700 Subject: [PATCH] just in case --- .../client/src/main/java/seaweedfs/client/SeaweedUtil.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/other/java/client/src/main/java/seaweedfs/client/SeaweedUtil.java b/other/java/client/src/main/java/seaweedfs/client/SeaweedUtil.java index 6e1905370..66ea9a98d 100644 --- a/other/java/client/src/main/java/seaweedfs/client/SeaweedUtil.java +++ b/other/java/client/src/main/java/seaweedfs/client/SeaweedUtil.java @@ -29,6 +29,9 @@ public class SeaweedUtil { } public static String[] toDirAndName(String fullpath) { + if (fullpath == null) { + return new String[]{"/", ""}; + } if (fullpath.endsWith("/")) { fullpath = fullpath.substring(0, fullpath.length() - 1); }