Cyberduck Mountain Duck CLI

Opened 9 months ago

Closed 8 months ago

Last modified 8 months ago

#10201 closed defect (fixed)

CLI Google Drive --existing file management

Reported by: togno Owned by: dkocher
Priority: normal Milestone: 6.4.0
Component: googledrive Version: 6.3.4
Severity: normal Keywords: googledrive; CLI
Cc: Architecture:
Platform: macOS 10.12

Description

This issue is specifically about Google Drive. I tried the same scenario on a Sftp server and -e command worked fine.

When i try to upload any file/folder to Google Drive the overwrite/skip/compare are ignored. I must add -e <action> to let the upload begin (otherwise the terminal ask me to specify the action), but action is actually ignored (except cancel). The files are always successfully uploaded, but when i try to upload a file with the same name it is not overwritten or skipped. At the end i get 2 files with the same name on Google Drive. I don't get any error during the process.

Attachments (1)

gdbugreport.png (163.8 KB) - added by togno 9 months ago.

Download all attachments as: .zip

Change History (5)

Changed 9 months ago by togno

comment:1 Changed 9 months ago by togno

  • Priority changed from normal to high

comment:2 Changed 9 months ago by dkocher

  • Milestone set to 7.0
  • Owner set to dkocher
  • Priority changed from high to normal
  • Status changed from new to assigned

comment:3 Changed 8 months ago by dkocher

  • Milestone changed from 7.0 to 6.4.0
  • Resolution set to fixed
  • Status changed from assigned to closed

I cannot reproduce this issue any longer with version 6.4.0.

comment:4 Changed 8 months ago by dkocher

  • Using skip option
    mellifera:~ dkocher$ duck --existing skip --upload googledrive://drive.google.com/My%20Drive/ ~/Desktop/test.png -v
    Authenticating as dkocher…
    > POST /o/oauth2/token HTTP/1.1
    > Accept-Encoding: gzip
    > User-Agent: Google-HTTP-Java-Client/1.24.0-SNAPSHOT (gzip)
    > Content-Length: 196
    > Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    > Host: accounts.google.com
    > Connection: Keep-Alive
    < HTTP/1.1 200 OK
    < Content-Type: application/json; charset=utf-8
    < X-Content-Type-Options: nosniff
    < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    < Pragma: no-cache
    < Expires: Mon, 01 Jan 1990 00:00:00 GMT
    < Date: Sat, 17 Feb 2018 19:38:39 GMT
    < Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
    < Content-Encoding: gzip
    < Server: ESF
    < X-XSS-Protection: 1; mode=block
    < X-Frame-Options: SAMEORIGIN
    < Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"
    Login successful…
    > GET /drive/v3/files?fields=files(createdTime,explicitlyTrashed,id,md5Checksum,mimeType,modifiedTime,name,size,webViewLink),nextPageToken&includeTeamDriveItems=true&orderBy=name&pageSize=1000&q='root'%20in%20parents&supportsTeamDrives=true HTTP/1.1
    > Accept-Encoding: gzip
    > User-Agent: Cyberduck/6.4.0.27606 (Mac OS X/10.13.2) (x86_64) Google-API-Java-Client
    > Host: www.googleapis.com
    > Connection: Keep-Alive
    > Authorization: ********
    < HTTP/1.1 200 OK
    < Expires: Sat, 17 Feb 2018 19:38:41 GMT
    < Date: Sat, 17 Feb 2018 19:38:41 GMT
    < Cache-Control: private, max-age=0, must-revalidate, no-transform
    < Vary: Origin
    < Vary: X-Origin
    < Content-Type: application/json; charset=UTF-8
    < Content-Encoding: gzip
    < X-Content-Type-Options: nosniff
    < X-Frame-Options: SAMEORIGIN
    < X-XSS-Protection: 1; mode=block
    < Server: GSE
    < Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"
    Transfer incomplete…
    }}
    
     * Using `overwrite` option
    
    {{
    mellifera:~ dkocher$ duck --existing overwrite --upload googledrive://drive.google.com/My%20Drive/ ~/Desktop/test.png -v
    Authenticating as dkocher…
    > POST /o/oauth2/token HTTP/1.1
    > Accept-Encoding: gzip
    > User-Agent: Google-HTTP-Java-Client/1.24.0-SNAPSHOT (gzip)
    > Content-Length: 196
    > Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    > Host: accounts.google.com
    > Connection: Keep-Alive
    < HTTP/1.1 200 OK
    < Content-Type: application/json; charset=utf-8
    < X-Content-Type-Options: nosniff
    < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    < Pragma: no-cache
    < Expires: Mon, 01 Jan 1990 00:00:00 GMT
    < Date: Sat, 17 Feb 2018 19:39:15 GMT
    < Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
    < Content-Encoding: gzip
    < Server: ESF
    < X-XSS-Protection: 1; mode=block
    < X-Frame-Options: SAMEORIGIN
    < Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"
    Login successful…
    > GET /drive/v3/files?fields=files(createdTime,explicitlyTrashed,id,md5Checksum,mimeType,modifiedTime,name,size,webViewLink),nextPageToken&includeTeamDriveItems=true&orderBy=name&pageSize=1000&q='root'%20in%20parents&supportsTeamDrives=true HTTP/1.1
    > Accept-Encoding: gzip
    > User-Agent: Cyberduck/6.4.0.27606 (Mac OS X/10.13.2) (x86_64) Google-API-Java-Client
    > Host: www.googleapis.com
    > Connection: Keep-Alive
    > Authorization: ********
    < HTTP/1.1 200 OK
    < Expires: Sat, 17 Feb 2018 19:39:16 GMT
    < Date: Sat, 17 Feb 2018 19:39:16 GMT
    < Cache-Control: private, max-age=0, must-revalidate, no-transform
    < Vary: Origin
    < Vary: X-Origin
    < Content-Type: application/json; charset=UTF-8
    < Content-Encoding: gzip
    < X-Content-Type-Options: nosniff
    < X-Frame-Options: SAMEORIGIN
    < X-XSS-Protection: 1; mode=block
    < Server: GSE
    < Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"
    Uploading test.png…
    > GET /drive/v3/files?fields=files(createdTime,explicitlyTrashed,id,md5Checksum,mimeType,modifiedTime,name,size,webViewLink),nextPageToken&includeTeamDriveItems=true&orderBy=name&pageSize=1&q=name%20%3D%20'test.png'%20and%20'root'%20in%20parents&supportsTeamDrives=true HTTP/1.1
    > Accept-Encoding: gzip
    > User-Agent: Cyberduck/6.4.0.27606 (Mac OS X/10.13.2) (x86_64) Google-API-Java-Client
    > Host: www.googleapis.com
    > Connection: Keep-Alive
    > Authorization: ********
    < HTTP/1.1 200 OK
    < Expires: Sat, 17 Feb 2018 19:39:17 GMT
    < Date: Sat, 17 Feb 2018 19:39:17 GMT
    < Cache-Control: private, max-age=0, must-revalidate, no-transform
    < Vary: Origin
    < Vary: X-Origin
    < Content-Type: application/json; charset=UTF-8
    < Content-Encoding: gzip
    < X-Content-Type-Options: nosniff
    < X-Frame-Options: SAMEORIGIN
    < X-XSS-Protection: 1; mode=block
    < Server: GSE
    < Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"
    < Transfer-Encoding: chunked
    > PATCH /upload/drive/v3/files/1VbDbfFRqPmyKGoit4nNLxlmM-Q6E4pCT?supportsTeamDrives=true HTTP/1.1
    > Content-Type: image/png
    > Content-Type: application/json; charset=UTF-8
    > Content-Length: 74877
    > Host: www.googleapis.com
    > Connection: Keep-Alive
    > User-Agent: Cyberduck/6.4.0.27606 (Mac OS X/10.13.2) (x86_64)
    > Accept-Encoding: gzip,deflate
    [▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮] 73.1 KiB (74,877 bytes) of 73.1 KiB (100%, 124.6 KB/sec)
    < HTTP/1.1 200 OK
    < X-GUploader-UploadID: AEnB2UoaQ4g2g5944tnEdpB4ExjraEzwTddtE-unrr9unoBHxUSA3fHyopG7f7dH_e-luD-ZI8rfRy-WhXt4T2aH6lva8gzktg
    < Vary: Origin
    < Vary: X-Origin
    < Content-Type: application/json; charset=UTF-8
    < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    < Pragma: no-cache
    < Expires: Mon, 01 Jan 1990 00:00:00 GMT
    < Date: Sat, 17 Feb 2018 19:39:20 GMT
    < Content-Length: 132
    < Server: UploadServer
    Upload complete…
    
    
Note: See TracTickets for help on using tickets.
swiss made software