Loading src/com/owncloud/android/lib/resources/files/CreateFolderRemoteOperation.java +4 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,10 @@ public class CreateFolderRemoteOperation extends RemoteOperation { } private RemoteOperationResult createParentFolder(String parentPath, OwnCloudClient client) { if (parentPath == null) { return new RemoteOperationResult(RemoteOperationResult.ResultCode.FILE_NOT_FOUND); } RemoteOperation operation = new CreateFolderRemoteOperation(parentPath, mCreateFullPath); return operation.execute(client); } Loading src/com/owncloud/android/lib/resources/files/FileUtils.java +7 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ package com.owncloud.android.lib.resources.files; import android.util.Log; import java.io.File; public class FileUtils { Loading @@ -35,6 +37,11 @@ public class FileUtils { public static String getParentPath(String remotePath) { String parentPath = new File(remotePath).getParent(); if (parentPath == null) { Log.w(TAG, "File.getParent() returns null for " + remotePath); return null; } parentPath = parentPath.endsWith(PATH_SEPARATOR) ? parentPath : parentPath + PATH_SEPARATOR; return parentPath; } Loading Loading
src/com/owncloud/android/lib/resources/files/CreateFolderRemoteOperation.java +4 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,10 @@ public class CreateFolderRemoteOperation extends RemoteOperation { } private RemoteOperationResult createParentFolder(String parentPath, OwnCloudClient client) { if (parentPath == null) { return new RemoteOperationResult(RemoteOperationResult.ResultCode.FILE_NOT_FOUND); } RemoteOperation operation = new CreateFolderRemoteOperation(parentPath, mCreateFullPath); return operation.execute(client); } Loading
src/com/owncloud/android/lib/resources/files/FileUtils.java +7 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ package com.owncloud.android.lib.resources.files; import android.util.Log; import java.io.File; public class FileUtils { Loading @@ -35,6 +37,11 @@ public class FileUtils { public static String getParentPath(String remotePath) { String parentPath = new File(remotePath).getParent(); if (parentPath == null) { Log.w(TAG, "File.getParent() returns null for " + remotePath); return null; } parentPath = parentPath.endsWith(PATH_SEPARATOR) ? parentPath : parentPath + PATH_SEPARATOR; return parentPath; } Loading