HCFS: fix mkdirs NPE

This commit is contained in:
Chris Lu
2019-09-01 12:25:06 -07:00
parent cb299dfaa2
commit af8b413a9c
2 changed files with 9 additions and 4 deletions

View File

@@ -34,13 +34,12 @@ public class FilerClient {
public boolean mkdirs(String path, int mode, int uid, int gid, String userName, String[] groupNames) {
Path pathObject = Paths.get(path);
String parent = pathObject.getParent().toString();
String name = pathObject.getFileName().toString();
if ("/".equals(path)) {
return true;
}
Path pathObject = Paths.get(path);
String parent = pathObject.getParent().toString();
String name = pathObject.getFileName().toString();
mkdirs(parent, mode, uid, gid, userName, groupNames);