1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-06 00:03:38 +00:00
Commit Graph

37 Commits

Author SHA1 Message Date
Gilbert Chen
e43e848d47 Find the storage path in shared folders first when connecting to Google Drive
When connecting to Google Drive with a service account key, only files in the
service account's own hidden drive space are listable.  This change finds
the given storage path among shared folders first so that folders from the user
space can be made accessible via service account.
2021-03-09 22:46:23 -05:00
Gilbert Chen
474f07e5cc Support GCD impersonation via modified service account file 2020-11-23 09:44:10 -05:00
Gilbert Chen
153f6a2d20 Use multiple threads to list the chunks directory for Google Drive 2020-06-15 12:49:13 -04:00
Gilbert Chen
79d8654a12 Allow the name of Google Shared Drive to be used in the storage url
The previous PR only accepts the id of the shared drive, which is not very
memorable.  This commit makes it able to specify the drive by id or by name.
2020-04-08 23:59:15 -04:00
Gilbert Chen
7208adbce2 Access Google Drive via service account.
Our GCS backend already supports service account.  This just copies relevant
code from there.
2020-04-06 23:25:47 -04:00
Richard Sanger
aa07feeac0 Fix bug in gcd: init fails to create directories
init would not create directories in the root of a drive as
it did not know the root drive's ID.
2020-01-11 17:25:21 +13:00
Richard Sanger
7719bb9f29 Fix: backup to shared drive root
Allows writing to the drive root using:
gcd://driveid@ or gcd://driveid@/

To write to the root of the default user's drive use the special
shared drive named 'root':
gcd://root@/
2019-11-27 00:00:40 +13:00
Richard Sanger
426110e961 Adds support for GDrive Shared Drives
A shared drive can be accessed via
gcd://sharedDriveId@path/to/storage

sharedDriveId is optional and if omitted duplicacy stores to the user's drive.
This remains backwards compatible with existing drives. E.g.
gcd://path/to/storage

Note: Shared Drives were previously named Team Drives.
2019-11-06 00:51:12 +13:00
turtleleo
82c6c15f1c Update duplicacy_gcdstorage.go
Add automatic retry on receiving error 408 (request timeout) from Google Drive.
2019-01-16 13:12:46 -05:00
gilbertchen
31c25e98f7 Merge branch 'master' into master 2019-01-04 13:48:44 -05:00
gilbertchen
242db8377e Merge pull request #447 from s4y/patch-1
Acknowledge malware/spam warnings from GCD
2019-01-04 13:33:11 -05:00
Michael Cook
0762c448c4 gofmt -s 2018-12-29 13:20:10 +01:00
Gilbert Chen
d8e13d8d85 Benchmark may incorrectly list the chunks directory when looking for previous temporary files 2018-10-22 09:11:15 -04:00
Sidney San Martín
20172e07e6 Acknowledge malware/spam warnings from GCD
If Google thinks that a file is malware or spam (which can happen
spuriously to blobs of encrypted data), it will prevent the initial
download and return an error with reason "cannotDownloadAbusiveFile".
The API expects a program to prompt the user in this case and then,
optionally, let them bypass it.

Ideally duplicacy should prompt, but this patch just logs a warning.

When I printed `err.(*googleapi.Error)`, its `Errors` field was empty,
hence the sketchy string matching. It's possible that I did something
wrong, though.
2018-06-13 10:49:04 -07:00
Gilbert Chen
50d2e2603a Fix the GCD directory creating bug; only save directories in the id cache 2017-12-11 11:17:19 -05:00
Gilbert Chen
61e4329522 Revert "Fixed a bug in creating directories in Google Drive storage backend"
This reverts commit 801433340a.

That fix puts everything in the cache which leads to a memory explosion problem.
The correct fix is to only put directories in the cache.
2017-12-11 08:26:32 -05:00
Gilbert Chen
801433340a Fixed a bug in creating directories in Google Drive storage backend 2017-12-10 23:02:12 -05:00
Michael Cinquin
3371ea445e create the destination folder on gcd storage if it doesn't exist 2017-12-01 12:28:52 +01:00
Gilbert Chen
a6de3c1e74 Follow-up changes for PR#259 2017-11-10 13:50:22 -05:00
Gilbert Chen
86767b3df6 Implement new chunk directory structure 2017-11-07 12:05:39 -05:00
Gilbert Chen
b788b9887c Slightly different backoff for GCD rate limit handling 2017-10-17 15:20:01 -04:00
Gilbert Chen
4640c20dec Post-review changes for GCD rate limit handling 2017-10-16 21:54:25 -04:00
TheBestPessimist
a5d3340837 Fix string format derp.
Goimports is weird. It changed something, but i have no idea what.
2017-10-01 12:33:32 +03:00
TheBestPessimist
bd39302eee Remove debugging code not needed for the push request. 2017-10-01 12:06:19 +03:00
TheBestPessimist
ed52850c98 Run goimports for the good looks 2017-09-21 08:16:54 +03:00
TheBestPessimist
46917ddf6b Merge branch 'master' into tbp/google_rate_limit_exceeded
* master:
  Run goimports on all source files
  restored original stats output, enabled option to switch to tabular
  added -tabular to check options
  moving "func min" to MinInt in utils
  reorder check -stats columns
  print additional, table-formatted stats for CHECK

# Conflicts:
#	src/duplicacy_gcdstorage.go
2017-09-21 08:15:02 +03:00
Gilbert Chen
923cd0aa63 Run goimports on all source files 2017-09-20 23:07:43 -04:00
TheBestPessimist
d20ea41cd0 Add a method for debugging which shows the method call chains, to find out where most of the retries come from 2017-09-20 18:52:46 +03:00
TheBestPessimist
ef19a3705f The initial thread backoff value should not be empty 2017-09-20 11:06:56 +03:00
TheBestPessimist
fc71cb1b49 Compute the next backoff value before using it 2017-09-20 11:00:02 +03:00
TheBestPessimist
6a03a98f55 Exponential Backoff should work now.
Maximum sleep is 32*2.
2017-09-20 10:43:47 +03:00
Gilbert Chen
6f70b37d61 In GCD backend each thread should have its own backoff value 2017-08-25 23:53:02 -04:00
Gilbert Chen
7f04a79111 Replace Fair Source 5 with our own free-for-personal-use license 2017-07-13 23:33:14 -04:00
Gilbert Chen
4291bc775b Retry on authentication error for Google Drive 2017-07-02 20:49:56 -04:00
Gilbert Chen
42337d84c3 Move source files into src for a better looking front page 2017-06-07 14:04:11 -04:00
Gilbert Chen
4a1dc01ff4 Reorganize src directory 2017-06-02 16:33:36 -04:00
Gilbert Chen
bdf017e552 Move source files to src/ 2017-05-23 10:25:00 -04:00