Skip to content

Google Drive _getFile doesn't check if a file ID exists before using it #1252

Open
@stuartlangridge

Description

In _getFile at

return this._getFileId(path).then((id) => {
and
return this._getMeta(id).then((meta) => {
the Google Drive backend retrieves a file ID but doesn't check that that file ID exists before using it in a request, leading to (if the requested file doesn't exist at all in Google Drive and so has no ID) requests being made to https://www.googleapis.com/drive/v2/files/undefined which is definitely wrong.

This isn't a PR because I'm not sure what should happen here; should that function throw an error, or fake a response object with statusCode 404, or something else?

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions