check if file is trashed, do not load trashed files, fixes #165

This commit is contained in:
Philipp Crocoll
2018-06-30 22:13:00 +02:00
parent 0464cecde5
commit 27fb2870ab

View File

@@ -312,6 +312,8 @@ public class GoogleDriveFileStorage extends JavaFileStorageBase {
String driveId = path.getGDriveId();
logDebug("id"+driveId);
File file = driveService.files().get(driveId).execute();
if (file.getLabels().getTrashed())
throw new FileNotFoundException(path.getDisplayName() + " is trashed!");
logDebug("...done.");
return file;
}