Skip to content
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

Some patches, some ideas. #57

Merged
merged 2 commits into from
Jun 11, 2012
Merged

Some patches, some ideas. #57

merged 2 commits into from
Jun 11, 2012

Conversation

LemonBoy
Copy link
Contributor

This makes grive behave a bit better.
The resources shouldn't assume that "." is the path base to make the whole system flexible enough to make libgrive (and grive) useful. If the source Drive is stored into the Resource then you could build the full path by just appending the drive m_state path and all the parent names.

@nestal
Copy link
Member

nestal commented Jun 11, 2012

Why should we move .grive to the home directory? I want to have one .grive file in every directory the user sync with Google Drive. A user can have multiple directories which contains multiple .grive files.

@nestal nestal merged commit 9a76cb8 into Grive:master Jun 11, 2012
@LemonBoy
Copy link
Contributor Author

It's not advised to clutter every directory, having a single database would be better.

@nestal
Copy link
Member

nestal commented Jun 11, 2012

Many thanks for the patch. I merged but reverted 9a76cb8 in my branch.

I have adjusted the indentation. I used tab characters instead of spaces. I hope you can follow.

We can continue our discussion on why we want to move .grive to $HOME.

@nestal
Copy link
Member

nestal commented Jun 11, 2012

Some people have multiple google accounts and multiple google drives, they may have multiple directories to sync and need different access tokens. That is why grive uses multiple .grive files in different directories.

@LemonBoy
Copy link
Contributor Author

Use a single config file and let the user define in there the drives and the folder that should be synced/watched for each drive. Something like

{
    "Drive1" : {
        username : "herp@gmail.com",
        pass : "derp",
        folders : [ "~/google", "/steals/my/data", "/while/i/sleep" ]
    },
    "Drive2" : {
        username : "derp@gmail.com",
        pass : "herp",
        folders : [ "~/p0rn" ]
    },
}

A much saner approach than syncing the cwd :)

@nestal
Copy link
Member

nestal commented Jun 11, 2012

That's a good idea! You want to write the code for it?

@LemonBoy
Copy link
Contributor Author

Libgrive should be adjusted to not assume the cwd (".") as resource root but using the parent drive folder instead.
Anyway I'm no c++ coder but should be quite easy given a robust json parser :)

@nestal
Copy link
Member

nestal commented Jun 11, 2012

Grive is using json-c right now. See libgrive/src/protocol/Json.cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants