diff options
| author | bingoohuang <bingoo.huang@gmail.com> | 2021-04-26 17:15:17 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-26 17:15:17 +0800 |
| commit | 4ee58922eff61a5a4ca29c0b4829b097a498549e (patch) | |
| tree | 301805fef4aa5d0096bfb1510536f7a009b661e7 /other/java/client/src | |
| parent | 5cdff56731d6be220d4d6e8624b859520dfeb021 (diff) | |
| parent | 86185262bb86e31f9a2f71e85d02df2502c7ad40 (diff) | |
| download | seaweedfs-4ee58922eff61a5a4ca29c0b4829b097a498549e.tar.xz seaweedfs-4ee58922eff61a5a4ca29c0b4829b097a498549e.zip | |
Merge pull request #6 from chrislusf/master
Diffstat (limited to 'other/java/client/src')
| -rw-r--r-- | other/java/client/src/main/java/seaweedfs/client/ByteBufferPool.java | 3 | ||||
| -rw-r--r-- | other/java/client/src/main/java/seaweedfs/client/FilerClient.java | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/other/java/client/src/main/java/seaweedfs/client/ByteBufferPool.java b/other/java/client/src/main/java/seaweedfs/client/ByteBufferPool.java index 994bcaa2b..51053becd 100644 --- a/other/java/client/src/main/java/seaweedfs/client/ByteBufferPool.java +++ b/other/java/client/src/main/java/seaweedfs/client/ByteBufferPool.java @@ -3,6 +3,7 @@ package seaweedfs.client; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.nio.Buffer; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; @@ -34,7 +35,7 @@ public class ByteBufferPool { } public static synchronized void release(ByteBuffer obj) { - obj.clear(); + ((Buffer)obj).clear(); bufferList.add(0, obj); } diff --git a/other/java/client/src/main/java/seaweedfs/client/FilerClient.java b/other/java/client/src/main/java/seaweedfs/client/FilerClient.java index c2ffe0ac6..257a9873d 100644 --- a/other/java/client/src/main/java/seaweedfs/client/FilerClient.java +++ b/other/java/client/src/main/java/seaweedfs/client/FilerClient.java @@ -94,7 +94,7 @@ public class FilerClient extends FilerGrpcClient { return true; } File pathFile = new File(path); - String parent = pathFile.getParent(); + String parent = pathFile.getParent().replace('\\','/'); String name = pathFile.getName(); mkdirs(parent, mode, uid, gid, userName, groupNames); @@ -115,11 +115,11 @@ public class FilerClient extends FilerGrpcClient { public boolean mv(String oldPath, String newPath) { File oldPathFile = new File(oldPath); - String oldParent = oldPathFile.getParent(); + String oldParent = oldPathFile.getParent().replace('\\','/'); String oldName = oldPathFile.getName(); File newPathFile = new File(newPath); - String newParent = newPathFile.getParent(); + String newParent = newPathFile.getParent().replace('\\','/'); String newName = newPathFile.getName(); return atomicRenameEntry(oldParent, oldName, newParent, newName); @@ -129,7 +129,7 @@ public class FilerClient extends FilerGrpcClient { public boolean rm(String path, boolean isRecursive, boolean ignoreRecusiveError) { File pathFile = new File(path); - String parent = pathFile.getParent(); + String parent = pathFile.getParent().replace('\\','/'); String name = pathFile.getName(); return deleteEntry( @@ -148,7 +148,7 @@ public class FilerClient extends FilerGrpcClient { public boolean touch(String path, int mode, int uid, int gid, String userName, String[] groupNames) { File pathFile = new File(path); - String parent = pathFile.getParent(); + String parent = pathFile.getParent().replace('\\','/'); String name = pathFile.getName(); FilerProto.Entry entry = lookupEntry(parent, name); |
