fix: throw NoSuchCloudFileException if fileId is missing
This commit is contained in:
parent
a491dd4766
commit
8c030a5f9c
@ -332,6 +332,8 @@ class PCloudImpl {
|
|||||||
Optional<RemoteEntry> remoteEntryOptional = findEntry(file.getParent().getId(), file.getName(), false);
|
Optional<RemoteEntry> remoteEntryOptional = findEntry(file.getParent().getId(), file.getName(), false);
|
||||||
if (remoteEntryOptional.isPresent()) {
|
if (remoteEntryOptional.isPresent()) {
|
||||||
fileId = remoteEntryOptional.get().asFile().fileId();
|
fileId = remoteEntryOptional.get().asFile().fileId();
|
||||||
|
} else {
|
||||||
|
throw new NoSuchCloudFileException(file.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user