diff --git a/src/tentaclio_gdrive/clients/google_drive_client.py b/src/tentaclio_gdrive/clients/google_drive_client.py index c15b785..e3d37db 100644 --- a/src/tentaclio_gdrive/clients/google_drive_client.py +++ b/src/tentaclio_gdrive/clients/google_drive_client.py @@ -164,7 +164,7 @@ def _drive(self): drives = self._get_drives() if self.drive_name not in drives: names = [d for d in drives] - raise ValueError(f"Drive name (hostname) should be one of {names}") + raise ValueError(f"Drive name {self.drive_name} should be one of {names}") return drives[self.drive_name] def _connect(self) -> "GoogleDriveFSClient": @@ -262,6 +262,8 @@ def _get_path_descriptors(self, ignore_tail=False) -> List[_GoogleFileDescriptor parts = self.path_parts if ignore_tail: parts = parts[:-1] + if self.drive_name == "Shared with me": + return [self._get_file_descriptor_by_name(parts[0])] return list(self._path_parts_to_descriptors(self._drive, parts)) def _path_parts_to_descriptors(