-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Windows filename issue, update Y/n Prompt, update readme #918
base: master
Are you sure you want to change the base?
Changes from all commits
57c4462
4f8b2e0
9bdc979
68b5899
313053b
e00b514
611b523
08ef171
8bfdde0
aad796b
0c0b657
677b484
3cdad57
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,7 +167,7 @@ Optionally set the `GOOGLE_API_CLIENT_ID` and `GOOGLE_API_CLIENT_SECRET` environ | |
|
||
### Hyphens: - vs -- | ||
|
||
A single hypen `-` can be used to specify options. However two hypens `--` can be used with any options in the provided examples below. | ||
A single hyphen `-` can be used to specify options. However two hyphens `--` can be used with any options in the provided examples below. | ||
|
||
### Initializing | ||
|
||
|
@@ -198,7 +198,7 @@ The opposite of `drive init`, it will remove your credentials locally as well as | |
drive deinit [-no-prompt] | ||
``` | ||
|
||
For a complete deinit-ialization, don't forget to revoke account access, [please see revoking account access](#revoking-account-access) | ||
For a complete deinitialization, don't forget to revoke account access, [please see revoking account access](#revoking-account-access) | ||
|
||
### Traversal Depth | ||
|
||
|
@@ -1420,10 +1420,10 @@ Background sync is not just hard, it is stupid. Here are my technical and philos | |
|
||
## Known Issues | ||
|
||
* It probably doesn't work on Windows. | ||
* Google Drive allows a directory to contain files/directories with the same name. Client doesn't handle these cases yet. We don't recommend you to use `drive` if you have such files/directories to avoid data loss. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather leave this statement in there because drive has to ask folks to fix name clashes(or it can do it automatically). There is also a force mode that just overwrites. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added it back with a link to learn more. |
||
* Racing conditions occur if remote is being modified while we're trying to update the file. Google Drive provides resource versioning with ETags, use Etags to avoid racy cases. | ||
* Race conditions occur if remote is being modified while we're trying to update the file. Google Drive provides resource versioning with ETags, use Etags to avoid racy cases. | ||
* drive rejects reading from namedPipes because they could infinitely hang. See [issue #208](https://github.com/odeke-em/drive/issues/208). | ||
* It is unsupported on Windows. Some functionality works but it has not been thoroughly tested. | ||
* Google Drive allows a directory to contain files/directories with the same name. Client doesn't handle these cases gracefully but can offer to 'fix clashes'. See #detecting-and-fixing-clashes . We don't recommend you to use `drive` if you have such files/directories to avoid data loss. | ||
|
||
## Reaching Out | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2057,6 +2057,10 @@ func relativePathsOpt(root string, args []string, leastNonExistant bool) ([]stri | |
relPath = "" | ||
} | ||
|
||
// This function appears to be meant to return server-side (/-separated) paths. | ||
// But its input is client side (maybe / or \) separted paths. | ||
// filepath.ToSlash fixes that. | ||
relPath = filepath.ToSlash(relPath) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you mean to instead replace: - relPath = "/" + relPath
+ relPath = filepath.ToSlash(relPath) instead of keeping both? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. It's been a while so I forget exactly what happened (see issue#917) , but it was something like on Windows the input might be something like "photos\myalbum". Which should then be converted into "/photos/myalbum" for use on the remove side, but instead was being turned in to "/photos\myalbum". So both the ToSlash (convert "photos\myalbum" into "photos/myalbum") and the "/" prepend are necessary. |
||
relPath = "/" + relPath | ||
relPaths = append(relPaths, relPath) | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -299,7 +299,7 @@ func (c *Context) DeInitialize(prompter func(...interface{}) bool, returnOnAnyEr | |
} | ||
|
||
for _, p := range pathsToRemove { | ||
if !prompter("remove: ", p, ". This operation is permanent (Y/N) ") { | ||
if !prompter("remove: ", p, ". This operation is permanent (Y/n) ") { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How come the change of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The capitla letter represents the default. https://unix.stackexchange.com/questions/15918/whats-the-standard-used-by-yum-prompt-is-this-ok-y-n |
||
continue | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah unfortunately I personally don't have Windows machines nor would I be able to verify that it works properly on Windows so I am hesitant about removing this statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added back a modified statement: that it's unsupported but works somewhat.