add null check

This commit is contained in:
Andy Scherzinger 2020-06-25 18:55:50 +02:00
parent ca7350fa8a
commit 2f60b75fc5
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -189,7 +189,9 @@ public final class FileStorageUtils {
public static String getParentPath(String remotePath) {
String parentPath = new File(remotePath).getParent();
parentPath = parentPath.endsWith(OCFile.PATH_SEPARATOR) ? parentPath : parentPath + OCFile.PATH_SEPARATOR;
if (parentPath != null) {
parentPath = parentPath.endsWith(OCFile.PATH_SEPARATOR) ? parentPath : parentPath + OCFile.PATH_SEPARATOR;
}
return parentPath;
}