fix: throw NoSuchCloudFileException if fileId is missing

This commit is contained in:
Manuel Jenny 2021-03-22 14:07:31 +01:00
parent a491dd4766
commit 8c030a5f9c
No known key found for this signature in database
GPG Key ID: 1C80FE62B2BEAA18

View File

@ -332,6 +332,8 @@ class PCloudImpl {
Optional<RemoteEntry> remoteEntryOptional = findEntry(file.getParent().getId(), file.getName(), false);
if (remoteEntryOptional.isPresent()) {
fileId = remoteEntryOptional.get().asFile().fileId();
} else {
throw new NoSuchCloudFileException(file.getName());
}
}
}