Giter VIP home page Giter VIP logo

grive2's Introduction

Grive2 0.5.3

09 Nov 2022, Vitaliy Filippov

http://yourcmc.ru/wiki/Grive2

This is the fork of original "Grive" (https://github.com/Grive/grive) Google Drive client with the support for the new Drive REST API and partial sync.

Grive simply downloads all the files in your Google Drive into the current directory. After you make some changes to the local files, run grive again and it will upload your changes back to your Google Drive. New files created locally or in Google Drive will be uploaded or downloaded respectively. Deleted files will also be "removed". Currently Grive will NOT destroy any of your files: it will only move the files to a directory named .trash or put them in the Google Drive trash. You can always recover them.

There are a few things that Grive does not do at the moment:

  • continously wait for changes in file system or in Google Drive to occur and upload. A sync is only performed when you run Grive (there are workarounds for almost continuous sync. See below).
  • symbolic links support.
  • support for Google documents.

These may be added in the future.

Enjoy!

Usage

When Grive is run for the first time, you should use the "-a" argument to grant permission to Grive to access to your Google Drive:

cd $HOME
mkdir google-drive
cd google-drive
grive -a

A URL should be printed. Go to the link. You will need to login to your Google account if you haven't done so. After granting the permission to Grive, the authorization code will be forwarded to the Grive application and you will be redirected to a localhost web page confirming the authorization.

If everything works fine, Grive will create .grive and .grive_state files in your current directory. It will also start downloading files from your Google Drive to your current directory.

To resync the direcory, run grive in the folder.

cd $HOME/google-drive
grive

Exclude specific files and folders from sync: .griveignore

Rules are similar to Git's .gitignore, but may differ slightly due to the different implementation.

  • lines that start with # are comments
  • leading and trailing spaces ignored unless escaped with \
  • non-empty lines without ! in front are treated as "exclude" patterns
  • non-empty lines with ! in front are treated as "include" patterns and have a priority over all "exclude" ones
  • patterns are matched against the filenames relative to the grive root
  • a/**/b matches any number of subpaths between a and b, including 0
  • **/a matches a inside any directory
  • b/** matches everything inside b, but not b itself
  • * matches any number of any characters except /
  • ? matches any character except /
  • .griveignore itself isn't ignored by default, but you can include it in itself to ignore

Scheduled syncs and syncs on file change events

There are tools which you can use to enable both scheduled syncs and syncs when a file changes. Together these gives you an experience almost like the Google Drive clients on other platforms (it misses the almost instantious download of changed files in the google drive).

Grive installs such a basic solution which uses inotify-tools together with systemd timer and services. You can enable it for a folder in your $HOME directory (in this case the $HOME/google-drive):

First install the inotify-tools (seems to be named like that in all major distros): test that it works by calling inotifywait -h.

Prepare a Google Drive folder in your $HOME directory with grive -a.

# 'google-drive' is the name of your Google Drive folder in your $HOME directory
systemctl --user enable grive@$(systemd-escape google-drive).service
systemctl --user start grive@$(systemd-escape google-drive).service

You can enable and start this unit for multiple folders in your $HOME directory if you need to sync with multiple google accounts.

You can also only enable the time based syncing or the changes based syncing by only directly enabling and starting the corresponding unit: grive-changes@$(systemd-escape google-drive).service or grive-timer@$(systemd-escape google-drive).timer.

Shared files

Files and folders which are shared with you don't automatically show up in your folder. They need to be added explicitly to your Google Drive: go to the Google Drive website, right click on the file or folder and chose 'Add to My Drive'.

Different OAuth2 client to workaround over quota and google approval issues

Google recently started to restrict access for unapproved applications: https://developers.google.com/drive/api/v3/about-auth?hl=ru

Grive2 is currently awaiting approval but it seems it will take forever. Also even if they approve it the default Client ID supplied with grive may exceed quota and grive will then fail to sync.

You can supply your own OAuth2 client credentials to work around these problems by following these steps:

  1. Go to https://console.developers.google.com/apis/api/drive.googleapis.com
  2. Choose a project (you might need to create one first)
  3. Go to https://console.developers.google.com/apis/library/drive.googleapis.com and "Enable" the Google Drive APIs
  4. Go to https://console.cloud.google.com/apis/credentials and click "Create credentials > Help me choose"
  5. In the "Find out what credentials you need" dialog, choose:
    • Which API are you using: "Google Drive API"
    • Where will you be calling the API from: "Other UI (...CLI...)"
    • What data will you be accessing: "User Data"
  6. In the next steps create a client id (name doesn't matter) and setup the consent screen (defaults are ok, no need for any URLs)
  7. The needed "Client ID" and "Client Secret" are either in the shown download or can later found by clicking on the created credential on https://console.developers.google.com/apis/credentials/
  8. When you change client ID/secret in an existing Grive folder you must first delete the old .grive configuration file.
  9. Call grive -a --id <client_id> --secret <client_secret> and follow the steps to authenticate the OAuth2 client to allow it to access your drive folder.

Installation

For the detailed instructions, see http://yourcmc.ru/wiki/Grive2#Installation

Install dependencies

You need the following libraries:

  • yajl 2.x
  • libcurl
  • libstdc++
  • libgcrypt
  • Boost (Boost filesystem, program_options, regex, unit_test_framework and system are required)
  • expat

There are also some optional dependencies:

  • CppUnit (for unit tests)
  • libbfd (for backtrace)
  • binutils (for libiberty, required for compilation in OpenSUSE, Ubuntu, Arch and etc)

On a Debian/Ubuntu/Linux Mint machine just run the following command to install all these packages:

sudo apt-get install git cmake build-essential libgcrypt20-dev libyajl-dev \
    libboost-all-dev libcurl4-openssl-dev libexpat1-dev libcppunit-dev binutils-dev \
    debhelper zlib1g-dev dpkg-dev pkg-config

Fedora:

sudo dnf install git cmake libgcrypt-devel gcc-c++ libstdc++ yajl-devel boost-devel libcurl-devel expat-devel binutils zlib

FreeBSD:

pkg install git cmake boost-libs yajl libgcrypt pkgconf cppunit libbfd

Build Debian packages

On a Debian/Ubuntu/Linux Mint you can use dpkg-buildpackage utility from dpkg-dev package to build grive. Just clone the repository, cd into it and run

dpkg-buildpackage -j4 --no-sign

Manual build

Grive uses cmake to build. Basic install sequence is

mkdir build
cd build
cmake ..
make -j4
sudo make install

Alternativly you can define your own client_id and client_secret during build

mkdir build
cd build
cmake .. "-DAPP_ID:STRING=<client_id>" "-DAPP_SECRET:STRING=<client_secret>"
make -j4
sudo make install

Version History

Grive2 v0.5.3

  • Implement Google OAuth loopback IP redirect flow
  • Various small fixes

Grive2 v0.5.1

  • Support for .griveignore
  • Automatic sync solution based on inotify-tools and systemd
  • no-remote-new and upload-only modes
  • Ignore regexp does not persist anymore (note that Grive will still track it to not accidentally delete remote files when changing ignore regexp)
  • Added options to limit upload and download speed
  • Faster upload of new and changed files. Now Grive uploads files without first calculating md5 checksum when file is created locally or when its size changes.
  • Added -P/--progress-bar option to print ASCII progress bar for each processed file (pull request by @svartkanin)
  • Added command-line options to specify your own client_id and client_secret
  • Now grive2 skips links, sockets, fifos and other unusual files
  • Various small build fixes

Grive2 v0.5

  • Much faster and more correct synchronisation using local modification time and checksum cache (similar to git index)
  • Automatic move/rename detection, -m option removed
  • force option works again
  • Instead of crashing on sync exceptions Grive will give a warning and attempt to sync failed files again during the next run.
  • Revision support works again. Grive 0.4.x always created new revisions for all files during sync, regardless of the absence of the --new-rev option.
  • Shared files now sync correctly

Grive2 v0.4.2

  • Option to exclude files by perl regexp
  • Reimplemented HTTP response logging for debug purposes
  • Use multipart uploads (update metadata and contents at the same time) for improved perfomance & stability
  • Bug fixes
  • Simple option to move/rename files and directories, via grive -m oldpath newpath (by Dylan Wulf, [email protected])

Known issues:

  • force option does not work as documented #51

Grive2 v0.4.1

  • Bug fixes

Grive2 v0.4.0

First fork release, by Vitaliy Filippov / vitalif at mail*ru

  • Support for the new Google Drive REST API (old "Document List" API is shut down by Google 20 April 2015)
  • REAL support for partial sync: syncs only one subdirectory with grive -s subdir
  • Major refactoring - a lot of dead code removed, JSON-C is not used anymore, API-specific code is split from non-API-specific
  • Some stability fixes from Visa Putkinen https://github.com/visap/grive/commits/visa
  • Slightly reduce number of syscalls when reading local files.

Grive v0.3

Bug fix & minor feature release. Fixed bugs:

  • #93: missing reference count increment in one of the Json constructors
  • #82: retry for HTTP error 500 & 503
  • #77: Fixed a bug where grive crashed on the first run.

New features:

  • #87: support for revisions
  • #86: partial sync (contributed by justin at tierramedia.com) that's not partial sync, that's only support for specifying local path on command line

grive2's People

Contributors

0-wiz-0 avatar agusalex avatar artox avatar cpu82 avatar crborga avatar fairlight1337 avatar fbicknel avatar gontadu avatar gwiltschek avatar ilpianista avatar jankatins avatar jasper1378 avatar jesus-bustos avatar joselsegura avatar jumoog avatar junghans avatar lemonboy avatar madjar avatar match065 avatar mitoskalandiel avatar ncaq avatar nestal avatar psfloyd avatar redmercury avatar sizeofvoid avatar stephencox avatar tatsh avatar tophergopher avatar vitalif avatar vlachoudis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grive2's Issues

sync fails after install

Hello, I installed grive2 as per instructions (Mint 17 64bit)
After authentication the sync fails with:

Reading remote server file list
HTTP GET "https://www.googleapis.com/drive/v2/files?maxResults=1000&q=%27me%27+in+readers+and+trashed%3dfalse"
HTTP response 200
exception: /home/mkauzlar/Downloads/grive2-master/libgrive/src/json/Val.cc(90): Throw in function const gr::Val& gr::Val::operator[](const string&) const
Dynamic exception type: boost::exception_detail::clone_implgr::Val::Error
[gr::NoKey*] = md5Checksum

/libgrive/src/json/Val.cc(90)

grive --dry-run
Reading local directories
Synchronizing folders
Reading remote server file list
exception: /Downloads/grive2-815d0ea44ea49044106cbc2b6685b57f078b5e9a/libgrive/src/json/Val.cc(90): Throw in function const gr::Val& gr::Val::operator[](const string&) const
Dynamic exception type: N5boost16exception_detail10clone_implIN2gr3Val5ErrorEEE
[PN2gr4expt12BacktraceTagE] = #0 0x4fc7e9 :0 gr::Exception::Exception()
#1 0x4e042d :0 gr::Val::Error::Error()
#2 0x4df81b :0 gr::Val::operator[](std::string const&) const
#3 0x4d40aa :0 gr::v2::Entry2::Update(gr::Val const&)
#4 0x4d3784 :0 gr::v2::Entry2::Entry2(gr::Val const&)
#5 0x4d28bb :0 gr::v2::Feed2::GetNext(gr::http::Agent*)
#6 0x4bea98 :0 gr::Drive::DetectChanges()
#7 0x4a43e9 :0 Main(int, char**)
#8 0x4a4a14 :0 main
#9 0x7f0ab35aeec5 /lib/x86_64-linux-gnu/libc.so.6 __libc_start_main
#10 0x4a31a9 :0 _start

Use stdout instead of stderr for non-warning/non-error messages

The basic output "Reading local directories..." appears to be printed to stderr. Given that these are purely informational and don't represent an error of any kind, these should be printed to stdout. As of now, I have to put this in cron and redirect all messages to /dev/null and receive no warning when things go wrong or get an email every 5 minutes about the syncing. Please send the messages to the appropriate output! Thanks

all requests get 401 "auth token expired" after a while

I am trying to sync some large photo backup folders, 20GB in total, a few thousand files. After grive 2 runs for a certain amount of time, probably more than an hour, all requests are getting "auth token expired". If I restart it picks up where it ran into trouble before for another hour, then hits the same thing again at a new point.

request failed due to auth token expired: 401 (body: {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "authError",
    "message": "Invalid Credentials",
    "locationType": "header",
    "location": "Authorization"
   }
  ],
  "code": 401,
  "message": "Invalid Credentials"
 }
}
). refreshing token

/home/XXXXXX/Downloads/grive2-master/libgrive/src/protocol/AuthAgent.cc(191): Throw in function long int gr::AuthAgent::CheckHttpResponse(long int, const string&, const gr::http::Header&)

/home/XXXXXX/Downloads/grive2-master/libgrive/src/protocol/AuthAgent.cc(191): Throw in function long int gr::AuthAgent::CheckHttpResponse(long int, const string&, const gr::http::Header&)
Dynamic exception type: N5boost16exception_detail10clone_implIXXXXXXXXXXXXXX

Dynamic exception type: N5boost16exception_detail10clone_implIN2gr4http5ErrorEEE
[PN2gr4expt12BacktraceTagE] = #0 0x4fc8b1 :0 gr::Exception::Exception()
#1 0x4d7017 :0 gr::http::Error::Error()
#2 0x4de4bd :0 gr::AuthAgent::CheckHttpResponse(long, std::string const&, gr::http::Header const&)
#3 0x4de006 :0 gr::AuthAgent::Post(std::string const&, std::string const&, gr::DataStream*, gr::http::Header const&)
#4 0x4ced47 :0 gr::v2::Syncer2::DeleteRemote(gr::Resource*)
#5 0x4c3502 :0 gr::Resource::SyncSelf(gr::Syncer*, gr::Val const&)
#6 0x4c30bd :0 gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#7 0x4c77cd :0 boost::mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource, gr::Syncer_, gr::DateTime&, gr::Val const&) const
#8 0x4c6bad :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1gr::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1gr::Resource*&&, int)
#9 0x4c5e43 :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > >::operator()gr::Resource*(gr::Resource*&)
#10 0x4c51e3 :0 boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Val > >)
#11 0x4c31cd :0 gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#12 0x4c77cd :0 boost::mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource, gr::Syncer
, gr::DateTime&, gr::Val const&) const
#13 0x4c6bad :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1gr::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1gr::Resource*&&, int)
#14 0x4c5e43 :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > >::operator()gr::Resource*(gr::Resource*&)
#15 0x4c51e3 :0 boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Val > >)
#16 0x4c31cd :0 gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#17 0x4c77cd :0 boost::mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource, gr::Syncer
, gr::DateTime&, gr::Val const&) const
#18 0x4c6bad :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1gr::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1gr::Resource*&&, int)
#19 0x4c5e43 :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > >::operator()gr::Resource*(gr::Resource*&)
#20 0x4c51e3 :0 boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Val > >)
#21 0x4c31cd :0 gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#22 0x4c77cd :0 boost::mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource, gr::Syncer
, gr::DateTime&, gr::Val const&) const
#23 0x4c6bad :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1gr::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1gr::Resource*&&, int)
#24 0x4c5e43 :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > >::operator()gr::Resource*(gr::Resource*&)
#25 0x4c51e3 :0 boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Val > >)
#26 0x4c31cd :0 gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#27 0x4c77cd :0 boost::mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource, gr::Syncer
, gr::DateTime&, gr::Val const&) const
#28 0x4c6bad :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1gr::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1gr::Resource*&&, int)
#29 0x4c5e43 :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > >::operator()gr::Resource*(gr::Resource*&)
#30 0x4c51e3 :0 boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Val > >)
#31 0x4c31cd :0 gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#32 0x4c77cd :0 boost::mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource, gr::Syncer
, gr::DateTime&, gr::Val const&) const
#33 0x4c6bad :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1gr::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1gr::Resource*&&, int)
#34 0x4c5e43 :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > >::operator()gr::Resource*(gr::Resource*&)
#35 0x4c51e3 :0 boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > >)
#36 0x4c31cd :0 gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#37 0x4cc4b7 :0 gr::State::Sync(gr::Syncer*, gr::Val const&)
#38 0x4beffb :0 gr::Drive::Update()
#39 0x4a4467 :0 Main(int, char**)
#40 0x4a4a14 :0 main
#41 0x7fa56485cec5 /lib/x86_64-linux-gnu/libc.so.6 __libc_start_main
#42 0x4a31a9 :0 _start

[PN2gr4http15HttpResponseTagE] = 403
[PN2gr4http6UrlTagE] = https://www.googleapis.com/drive/v2/files/XXXXXXXXXXXXXXXX/trash
[PN2gr4http9HeaderTagE] = If-Match: "XXXXXXXXXXXXXX/XXXXXXXX"
Authorization: Bearer XXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GData-Version: 3.0

Error when authenticating!

Every time after running $ grive -a and copy; pasting authentication code, following error was thrown

exception: /build/grive2-arRs3e/grive2-0.4.0/libgrive/src/http/CurlAgent.cc(196): Throw in function long int gr::http::CurlAgent::ExecCurl(const string&, gr::DataStream*, const gr::http::Header&)
Dynamic exception type: boost::exception_detail::clone_impl<gr::http::Error>
[gr::expt::BacktraceTag*] = #0 0x4739c0 grive gr::Exception::Exception()
#1 0x452724 grive gr::http::CurlAgent::ExecCurl(std::string const&, gr::DataStream*, gr::http::Header const&)
#2 0x452c32 grive gr::http::CurlAgent::Post(std::string const&, std::string const&, gr::DataStream*, gr::http::Header const&)
#3 0x457829 grive gr::OAuth2::Auth(std::string const&)
#4 0x42de42 grive Main(int, char**)
#5 0x42c1fb grive main
#6 0x7f68b9fe4ec5 /lib/x86_64-linux-gnu/libc.so.6 __libc_start_main
#7 0x42cd74 grive 

[gr::http::CurlCodeTag*] = 7
[gr::http::CurlErrMsgTag*] = Failed to connect to accounts.google.com port 443: No route to host
[gr::http::RequestHeadersTag*] = 
[gr::http::UrlTag*] = https://accounts.google.com/o/oauth2/token

What is the problem?

dotted folders are not ignored anymore

Tonight something strange happened when syncing with Grive2: the program downloaded from Drive all the folders with a dot in front, which it used to ignore before. I didn't change anything since I compiled Grive2 on my Banana-Pi, back in july so I suspect something has changed API-side, but I think it's worth mentioning here anyway.

infinite loop after refreshing token

After the token is refreshed grive keeps uploading the same file. Here is the output with the --debug flag specified. I'm using the latest revision.

HTTP PUT "https://www.googleapis.com/upload/drive/v2/files/0B4RChP-vlFkwb2pYb0VVNWJOTVE?uploadType=media"
HTTP response 401
request failed due to auth token expired: 401. refreshing token
HTTP PUT "https://www.googleapis.com/upload/drive/v2/files/0B4RChP-vlFkwb2pYb0VVNWJOTVE?uploadType=media"
HTTP response 401
request failed due to auth token expired: 401. refreshing token
HTTP PUT "https://www.googleapis.com/upload/drive/v2/files/0B4RChP-vlFkwb2pYb0VVNWJOTVE?uploadType=media"
HTTP response 401
request failed due to auth token expired: 401. refreshing token
HTTP PUT "https://www.googleapis.com/upload/drive/v2/files/0B4RChP-vlFkwb2pYb0VVNWJOTVE?uploadType=media"
HTTP response 401
request failed due to auth token expired: 401. refreshing token
HTTP PUT "https://www.googleapis.com/upload/drive/v2/files/0B4RChP-vlFkwb2pYb0VVNWJOTVE?uploadType=media"
HTTP response 401
request failed due to auth token expired: 401. refreshing token
HTTP PUT "https://www.googleapis.com/upload/drive/v2/files/0B4RChP-vlFkwb2pYb0VVNWJOTVE?uploadType=media"
^C

sync from two locations

Hello,

I have two locations where I use grive, at home and in the office (with two separate PCs)

Yesterday in the office I deleted a bunch of files locally and run grive to sync to google drive. All ok there, the files were removed in the drive too.
Today I run grive on my pc at home and it says that some files are missing on the google drive (the ones I deleted yesterday) and attempts to upload them.

What I would expect is that it removes the files locally in the home pc.

Regards

CentOS 6 compilation fail (yajl and boost-date-time)

I installed all requirements and just did git clone.

root@/home/cloud/grive2/build# cmake ..
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found libgcrypt: -lgcrypt -ldl -lgpg-error
-- Found CURL: /usr/lib64/libcurl.so (found version "7.19.7")
-- Found EXPAT: /usr/lib64/libexpat.so (found version "2.0.1")
-- Boost version: 1.41.0
-- Found the following Boost libraries:
--   program_options
--   filesystem
--   unit_test_framework
--   regex
--   system
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.3")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.23")
-- checking for module 'yajl'
--   package 'yajl' not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:279 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
  libgrive/CMakeLists.txt:15 (pkg_check_modules)


CMake Error at /usr/lib64/boost/Boost.cmake:536 (message):
  The imported target "boost_date_time-static" references the file

     "/usr/lib64/lib64/libboost_date_time.a"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/lib64/boost/Boost.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib64/boost/BoostConfig.cmake:28 (include)
  /usr/share/cmake/Modules/FindBoost.cmake:177 (find_package)
  grive/CMakeLists.txt:3 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/cloud/grive2/build/CMakeFiles/CMakeOutput.log".

But yajl package is here, and boost_date_time too. (There is no static libboost_date_time.a in Centos, though.)

root@/home/cloud/grive2/build# rpm -qa --last
yajl-devel-1.0.7-3.el6.x86_64                 Sun Oct 11 17:51:43 2015
cmake-2.8.12.2-4.el6.x86_64                   Sun Oct 11 17:51:21 2015
libarchive-2.8.3-4.el6_2.x86_64               Sun Oct 11 17:51:19 2015
boost-devel-1.41.0-27.el6.x86_64              Sun Oct 11 17:50:42 2015
boost-math-1.41.0-27.el6.x86_64               Sun Oct 11 17:50:38 2015
boost-1.41.0-27.el6.x86_64                    Sun Oct 11 17:50:38 2015
boost-signals-1.41.0-27.el6.x86_64            Sun Oct 11 17:50:37 2015
boost-python-1.41.0-27.el6.x86_64             Sun Oct 11 17:50:37 2015
boost-serialization-1.41.0-27.el6.x86_64      Sun Oct 11 17:50:36 2015
boost-iostreams-1.41.0-27.el6.x86_64          Sun Oct 11 17:50:35 2015
boost-test-1.41.0-27.el6.x86_64               Sun Oct 11 17:50:34 2015
boost-program-options-1.41.0-27.el6.x86_64    Sun Oct 11 17:50:34 2015
boost-wave-1.41.0-27.el6.x86_64               Sun Oct 11 17:50:33 2015
boost-graph-1.41.0-27.el6.x86_64              Sun Oct 11 17:50:33 2015
boost-regex-1.41.0-27.el6.x86_64              Sun Oct 11 17:50:32 2015
boost-date-time-1.41.0-27.el6.x86_64          Sun Oct 11 17:50:32 2015
boost-thread-1.41.0-27.el6.x86_64             Sun Oct 11 17:50:31 2015
boost-filesystem-1.41.0-27.el6.x86_64         Sun Oct 11 17:50:30 2015
boost-system-1.41.0-27.el6.x86_64             Sun Oct 11 17:50:29 2015
...
yajl-1.0.7-3.el6.x86_64                       Tue Sep  3 05:07:43 2013

force option not working as documented

  -f [ --force ]        Force grive to always download a file from Google Drive
                        instead of uploading it.

but when I locally change a file that's already in google drive, grive2 uploads it despite the -f setting:

+carlos@carlos gdrive$ grive -f
Reading local directories
Synchronizing folders
Reading remote server file list
Detecting changes from last sync
Synchronizing files
sync "./.bashrc" changed in local. uploading

const: Assertion `m_ctx.size() == 1U' failed.

Grive -a fails with the following error:

andreas@notebook:~/src/grive2/build/grive$ ./grive -a

Please go to this URL and get an authentication code:

Link removed

Please input the authentication code here:
code removed
grive: /home/andreas/src/grive2/libgrive/src/json/ValBuilder.cc:133: gr::Val gr::ValBuilder::Result() const: Assertion `m_ctx.size() == 1U' failed.
Abgebrochen (Speicherabzug geschrieben)

Segmentation fault

I've compile grive2 without errors but when I run grive in my debian armhf board I always get the "Segmentation fault" error.

Errror in grive2 with first run

When I try first run, the program crash. I type at the prompt:
$ grive -l log.txt --log-http http.

Distributor ID: Mageia
Description: Mageia 5 x86_64
Codename: thornicroft
Kernel : Linux 4.1.8-desktop-1.mga5 x86_64

log.txt

grive version 0.4.2-pre Oct 5 2015 21:39:27
current time: 2015-10-05T20:36:46.568Z
config file name "./.grive"
logging HTTP response: http2015-10-05.203646.txt
HTTP POST "https://accounts.google.com/o/oauth2/token" with "code=4/BD26yxJmFSmAl5nZA8jfKHsSHAavttdTOuXTj3PgRuM&client_id=22314510474.apps.googleusercontent.com&client_secret=bl4ufi89h-9MkFlypcI7R785&redirect_uri=urn:ietf:wg:oauth:2.0:oob&grant_type=authorization_code"
HTTP response 200
exception: /home/joseto/Descargas/grive2-master/libgrive/src/json/ValBuilder.cc(136): Throw in function gr::Val gr::ValBuilder::Result() const
Dynamic exception type: N5boost16exception_detail10clone_implIN2gr10ValBuilder5ErrorEEE
[PN2gr10UnexpectedE] = {"access_token":"ya29.AwJdAemEh45Z92-PI5MXsYCDaLxeeTQVZDFpFq0ZwHgpzGA6K_tHDwIFFt-EZkwDdHbk","expires_in":3600,"id_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6ImU4NWE0NmE1NmM3YzRkNzljNzE0MDU1OGZjNDI0ZGZlZjQzZjg3MGYifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXRfaGFzaCI6IjYtRzM0bzRNVGZKdE4tbk9VY1BJSGciLCJhdWQiOiIyMjMxNDUxMDQ3NC5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsInN1YiI6IjExNDM5MDI0MTUwMTI5NTY3OTk4OSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhenAiOiIyMjMxNDUxMDQ3NC5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsImVtYWlsIjoiam90b3JpMTI1QGdtYWlsLmNvbSIsImlhdCI6MTQ0NDA3NzQzMCwiZXhwIjoxNDQ0MDgxMDMwfQ.fEFwAjQqFGINZ9a-MXBLsQKdKkdw59HarRvaCJ8d9FoKxnOANt4WHbUfzUI-NunKeanNF-OQT-J2zSWKzDKUWt76cIFhhd6GcSDu9MQFr7hxyvGkCOc2guuIcney_vO8YhScg7wfaY4f0VRY4G7C-FAQGsrTJwEzFRRnzHlDFgO4qbKyRAeTMhJIkrpRruK_IWLTKQc7CtDXuT-jGBl_UYQpm7zALie2RwbmtOgpJv5zFCBv5G9El5KmXLw2S9ZsSpIrQtXWu3oa4V87mFm-gjNppGXSaPtOhr1RosVsm7KpkKQ5BZECUQf_D56XxkSDWf2RLlljbaGDzGIJfU8KAg","refresh_token":"1/kzzPl88Ry5eGfAJZqwVy7dRtNO6eKT1CBBiBjJcfPZI","token_type":"Bearer"}

http2015-10-05.203646.txt

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: Fri, 01 Jan 1990 00:00:00 GMT
Date: Mon, 05 Oct 2015 20:37:10 GMT
Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt
P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Set-Cookie: NID=72=bQpzXhR9nWS1sYcUV5nOYD7aHeQu0QGOT4OpEnj7J4_mo2lmfTY82xYazsB0VhVQ1kbPh1-HPxQPst3ThVicmxRLNYt2UnorbH1UzFQ8vY1226CTseyAfatbWlylWhul;Domain=.google.com;Path=/;Expires=Tue, 05-Apr-2016 20:37:10 GMT;HttpOnly
Alternate-Protocol: 443:quic,p=1
Alt-Svc: quic=":443"; p="1"; ma=604800
Accept-Ranges: none
Vary: Accept-Encoding
Transfer-Encoding: chunked

{
"access_token" : "ya29.AwJdAemEh45Z92-PI5MXsYCDaLxeeTQVZDFpFq0ZwHgpzGA6K_tHDwIFFt-EZkwDdHbk",
"token_type" : "Bearer",
"expires_in" : 3600,
"id_token" : "eyJhbGciOiJSUzI1NiIsImtpZCI6ImU4NWE0NmE1NmM3YzRkNzljNzE0MDU1OGZjNDI0ZGZlZjQzZjg3MGYifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXRfaGFzaCI6IjYtRzM0bzRNVGZKdE4tbk9VY1BJSGciLCJhdWQiOiIyMjMxNDUxMDQ3NC5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsInN1YiI6IjExNDM5MDI0MTUwMTI5NTY3OTk4OSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhenAiOiIyMjMxNDUxMDQ3NC5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsImVtYWlsIjoiam90b3JpMTI1QGdtYWlsLmNvbSIsImlhdCI6MTQ0NDA3NzQzMCwiZXhwIjoxNDQ0MDgxMDMwfQ.fEFwAjQqFGINZ9a-MXBLsQKdKkdw59HarRvaCJ8d9FoKxnOANt4WHbUfzUI-NunKeanNF-OQT-J2zSWKzDKUWt76cIFhhd6GcSDu9MQFr7hxyvGkCOc2guuIcney_vO8YhScg7wfaY4f0VRY4G7C-FAQGsrTJwEzFRRnzHlDFgO4qbKyRAeTMhJIkrpRruK_IWLTKQc7CtDXuT-jGBl_UYQpm7zALie2RwbmtOgpJv5zFCBv5G9El5KmXLw2S9ZsSpIrQtXWu3oa4V87mFm-gjNppGXSaPtOhr1RosVsm7KpkKQ5BZECUQf_D56XxkSDWf2RLlljbaGDzGIJfU8KAg",
"refresh_token" : "1/kzzPl88Ry5eGfAJZqwVy7dRtNO6eKT1CBBiBjJcfPZI"
}

Grive Tools

Hi, great idea to update grive. Could you please also fork grive-tools? (In order to get a GUI) Thanks!

Selective synch / .exclude file

Do the .exclude and .include files work? What should the format be?

Please add information to man, or publish somehow, the format for creating .exclude file, so that one can selectively synch folders.

Can wildcards be used, to exclude contents of an entire directory/subdirectory?

eg: e.g.

/My Drive/Photos/big/*
or
./Google Photos/*.jpg

Many thanks

Sub-subdirectory sync behavior

It would be nice to be able to sync specific sub-subdirectories, e.g.

grive -s parent/child

and have grive create parent/child locally. Instead, it just fails, presumably since the parent folder hasn't been synced?

Could not build when following instructions

Not a big issue ;-). I was following the directions here:

http://yourcmc.ru/wiki/Grive2

but alas when I tried to build a missing library was reported: boost_unit_test_framework

I had done this as suggested:

sudo apt-get install git cmake build-essential libgcrypt11-dev libyajl-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libcurl4-openssl-dev libexpat1-dev libcppunit-dev binutils-dev

Was easy fixed as I just installed libboost-all-dev and it worked.

I couldn't be bothered working out which of the quidzillion boost packages contained the missing boost_unit_test_framework alas. So just installed all of boost. Seems worth recommending anyhow.

Error while building with cppunit

Make drops the following error as long as the package "cppunit" is installed.

MYCOMPILATIONDIR/src/grive-git/libgrive/test/drive/StateTest.cc:24:26: fatal error: drive/State.hh: No such file or directory
compilation terminated.
libgrive/CMakeFiles/unittest.dir/build.make:77: recipe for target 'libgrive/CMakeFiles/unittest.dir/test/drive/StateTest.cc.o' failed
make[2]: *** [libgrive/CMakeFiles/unittest.dir/test/drive/StateTest.cc.o] Error 1
CMakeFiles/Makefile2:149: recipe for target 'libgrive/CMakeFiles/unittest.dir/all' failed
make[1]: *** [libgrive/CMakeFiles/unittest.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

grive2 0.4.1 exception

exception: /home/XXX/Downloads/grive2-0.4.1/libgrive/src/protocol/AuthAgent.cc(202): Throw in function long int gr::AuthAgent::CheckHttpResponse(long int, const string&, const gr::http::Header&)
Dynamic exception type: N5boost16exception_detail10clone_implIN2gr4http5ErrorEEE
[PN2gr4http15ResponseBodyTagE] =
[PN2gr4http15ResponseCodeTagE] = 404
[PN2gr4http17RequestHeadersTagE] = Authorization: Bearer ya29._gHj5T4-GPFiSk7ix2LDZhdaY18XRctDZTuCJkNnA7TOIiI3F0PCdxoQ204JAhyudsVJ
GData-Version: 3.0

[PN2gr4http18ResponseHeadersTagE] = HTTP/1.1 404 Not Found
X-GUploader-UploadID: XXX-XXXXXX-XXXX_XXX-XZXXXXX
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: false
Access-Control-Allow-Headers: Accept, Accept-Language, Authorization, Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Length, Content-MD5, Content-Range, Content-Type, Date, GData-Version, Host, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, OriginToken, Pragma, Range, Slug, Transfer-Encoding, X-ClientDetails, X-GData-Client, X-GData-Key, X-Goog-AuthUser, X-Goog-PageId, X-Goog-Encode-Response-If-Executable, X-Goog-Correlation-Id, X-Goog-Request-Info, X-Goog-Experiments, x-goog-iam-authority-selector, x-goog-iam-authorization-token, X-Goog-Spatula, X-Goog-Upload-Command, X-Goog-Upload-Content-Disposition, X-Goog-Upload-Content-Length, X-Goog-Upload-Content-Type, X-Goog-Upload-File-Name, X-Goog-Upload-Offset, X-Goog-Upload-Protocol, X-Goog-Visitor-Id, X-HTTP-Method-Override, X-JavaScript-User-Agent, X-Pan-Versionid, X-Origin, X-Referer, X-Upload-Content-Length, X-Upload-Content-Type, X-Use-HTTP-Status-Code-Override, X-YouTube-VVT, X-YouTube-Page-CL, X-YouTube-Page-Timestamp
Access-Control-Allow-Methods: GET,OPTIONS
Date: Wed, 30 Sep 2015 09:44:47 GMT
Expires: Wed, 30 Sep 2015 09:44:47 GMT
Cache-Control: private, max-age=0
Content-Length: 0
Server: UploadServer
Content-Type: text/html; charset=UTF-8
Alternate-Protocol: 443:quic,p=1
Alt-Svc: quic=":443"; p="1"; ma=604800

[PN2gr4http6UrlTagE] = https://doc-0o-4g-docs.googleusercontent.com/docs/securesc/XXXX/ZZZZ//PPPPPP/DDDDDDD?h=05713018181182417404&e=download&gd=true

Names file after "Current Version" instead of actual filename

Hello,

I have started to use grive2. It is nice, but I believe I have found one bug.

Through Google's Windows and Mac client we are renaming files. They are also renamed through Googles Web App.

On ubuntu 14.04, we use grive2 for download, but then the filenames becomes incorrect.

Let's illustrate the behaviour with an example.

This the filename in OS X:

5.Etagesteg--Etagesteg_i_massiv_ek.JPG

This is the filename on Ubuntu:

P1000777.JPG

In the web app one can see that the "Current Version" is P1000777.JPG (refer to the attachment).
However I expect the filename to be the same as on Windows and OS X. Or?

$ grive --version
grive version 0.4.0-pre Sep 28 2015 09:02:25

Let me know if you need more details.

/Kind Regards
L
google_drive_web_app

ignore option totally ignored

I just created a grive directory and touched files yyy and zzz in it. Now running grive --ignore yyy or grive --ignore '.*zzz.*' will upload both files.

JSON parser exception after refreshing token

Here is the output of grive with --debug enabled

HTTP POST "https://www.googleapis.com/drive/v2/files" with "{"parents":[{"id":"0B4RChP-vlFkwYVdGZWZ2Z25GQ1k"}],"title":"duplicity-full.20150625T172107Z.vol34.difftar.gz"}"
HTTP response 200
HTTP PUT "https://www.googleapis.com/upload/drive/v2/files/0B4RChP-vlFkweVpTQ29DNGxYR3c?uploadType=media"
HTTP response 401
resquest failed due to auth token expired: 401. refreshing token
HTTP PUT "https://www.googleapis.com/upload/drive/v2/files/0B4RChP-vlFkweVpTQ29DNGxYR3c?uploadType=media"
exception: /home/tim/src/grive2-master/libgrive/src/json/JsonParser.cc(169): Throw in function void gr::JsonParser::Parse(const char_, std::size_t)
Dynamic exception type: boost::exception_detail::clone_implgr::JsonParser::Error
[gr::expt::BacktraceTag_] = #0 0x4f8f90 :0 gr::Exception::Exception()
#1 0x4efe35 :0 gr::JsonParser::Error::Error()
#2 0x4efac1 :0 gr::JsonParser::Parse(char const*, unsigned long)
#3 0x4ebc15 :0 gr::http::ValResponse::Write(char const*, unsigned long)
#4 0x4d94ae :0 gr::http::CurlAgent::Receive(void_, unsigned long, unsigned long, gr::DataStream_)
#5 0x7f841e922cd0 /usr/lib/x86_64-linux-gnu/libcurl.so.4
#6 0x7f841e937650 /usr/lib/x86_64-linux-gnu/libcurl.so.4
#7 0x7f841e9409dc /usr/lib/x86_64-linux-gnu/libcurl.so.4
#8 0x7f841e941181 /usr/lib/x86_64-linux-gnu/libcurl.so.4 curl_multi_perform
#9 0x7f841e9387b3 /usr/lib/x86_64-linux-gnu/libcurl.so.4 curl_easy_perform
#10 0x4d95f2 :0 gr::http::CurlAgent::ExecCurl(std::string const&, gr::DataStream*, gr::http::Header const&)
#11 0x4d9b8d :0 gr::http::CurlAgent::Put(std::string const&, gr::File_, gr::DataStream_, gr::http::Header const&)
#12 0x4e0712 :0 gr::AuthAgent::Put(std::string const&, gr::File_, gr::DataStream_, gr::http::Header const&)
#13 0x4d37fc :0 gr::v2::Syncer2::Upload(gr::Resource*)
#14 0x4d2dcc :0 gr::v2::Syncer2::Create(gr::Resource*)
#15 0x50088a :0 gr::Resource::SyncSelf(gr::Syncer*, gr::Val const&)
#16 0x500522 :0 gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#17 0x503ceb :0 boost::mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource, gr::Syncer_, gr::DateTime&, gr::Val const&) const
#18 0x503407 :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1gr::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1gr::Resource*&&, int)
#19 0x502b70 :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > >::operator()gr::Resource*(gr::Resource*&)
#20 0x50237b :0 boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Val > >)
#21 0x500626 :0 gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#22 0x503ceb :0 boost::mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource, gr::Syncer
, gr::DateTime&, gr::Val const&) const
#23 0x503407 :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1gr::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1gr::Resource*&&, int)
#24 0x502b70 :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > >::operator()gr::Resource*(gr::Resource*&)
#25 0x50237b :0 boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Val > >)
#26 0x500626 :0 gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#27 0x503ceb :0 boost::mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource, gr::Syncer
, gr::DateTime&, gr::Val const&) const
#28 0x503407 :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1gr::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1gr::Resource*&&, int)
#29 0x502b70 :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > >::operator()gr::Resource*(gr::Resource*&)
#30 0x50237b :0 boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocatorgr::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::Syncer*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Val > >)
#31 0x500626 :0 gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#32 0x4c71a1 :0 gr::State::Sync(gr::Syncer*, gr::Val const&)
#33 0x4cbffa :0 gr::Drive::Update()
#34 0x4a8003 :0 Main(int, char**)
#35 0x4a8589 :0 main
#36 0x7f841d265ec5 /lib/x86_64-linux-gnu/libc.so.6 __libc_start_main
#37 0x4a6d89 :0 _start

[gr::JsonText*] = {
"error": {
"errors": [
{
"domain": "global",
"reason": "authError",
"message": "Invalid Credentials",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Invalid Credentials"
}
}

[gr::ParseErr*] = parse error: trailing garbage
{ "error": { "errors": [
(right here) ------^

Strange behaviour when using option -s (Subdirectory to sync) for two different folders

I have folders A, B and C and only want to sync A and B invoking grive twice with different -s value:

grive -s A
grive -s B

The problem is that grive update .grive_state after first invocation and if a new file was created in B it just think it was delete on remote before second grive invocation since timestamp of update is newer than timestamp of the new file due to first invocation.

I workaround this behaviour using this approach:

mv .grive_state.A .grive_state
grive -s A
mv .grive_state .grive_state.A

mv .grive_state.B .grive_state
grive -s B
mv .grive_state .grive_state.B

I think this should be address by grive using some kind of nested update states for paths inside .grive_state file.

Synchronization takes ages

On my 1 To (85% full) drive, it takes 2 to 3 hours of computing before sending any actual data. even if I have only added a single file.

I know that since grive is not running in background, it can't be aware of file modifications (unlike the windows official client) so I guess there is no simple answer to that problem.

IMHO, a solution could be a "fast" mode, that does not check for file modifications but only for files added or removed. Since no checksum would be computed in this mode it would be a lot faster.
It could be used for fast upload, between two comprehensive "regular" scans.

Another solution could be a "simple" mode, using a faster way to compare files. For exemple by only checking file size, date and name. Or by using a faster checksum algorithm.

Thank you very much.

Grive2 not syncing local files

I'm trying to sync a specific folder (with new files in it) but grive states that that folder is being ignored. Nevertheless it is checking all the files form Drive, marking them as "parent doesn't exist, ignored" and not syncing anything of the new files.

Something wrong on my side or a bug?

Thanx

Error thrown when deleting local version of shared file

When I delete a local copy of a file that has been shared with me on GDrive (owned by my partner), then I get the following:

sync "./Interview Audio/davedonde1.mp4" deleted in local. deleting remote
exception: /home/jon/bin/grive2-master/libgrive/src/protocol/AuthAgent.cc(142): Throw in function long int gr::AuthAgent::CheckHttpResponse(long int, const string&, const gr::http::Header&)
Dynamic exception type: N5boost16exception_detail10clone_implIN2gr4http5ErrorEEE
[PN2gr4expt12BacktraceTagE] = #0 0x4f5622 :0 gr::Exception::Exception()
#1 0x4d4d2d :0 gr::http::Error::Error()
#2 0x4da3c5 :0 gr::AuthAgent::CheckHttpResponse(long, std::string const&, gr::http::Header const&)
#3 0x4d9f13 :0 gr::AuthAgent::Request(std::string const&, std::string const&, gr::SeekStream_, gr::DataStream_, gr::http::Header const&)
#4 0x4d2bbc :0 gr::http::Agent::Post(std::string const&, std::string const&, gr::DataStream*, gr::http::Header const&)
#5 0x4cd4ae :0 gr::v2::Syncer2::DeleteRemote(gr::Resource*)
#6 0x4fffb9 :0 gr::Resource::SyncSelf(gr::Syncer*, gr::Val const&)
#7 0x4ffba0 :0 gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#8 0x503539 :0 boost::mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource, gr::Syncer_, gr::DateTime&, gr::Val const&) const

[...] -- please see attached for full error message.

Using grive version 0.4.2-pre Nov 12 2015 11:49:25
grive_error.txt

(Obviously I can work around this by managing shared files on the web interface instead.)

Error on ntfs partition.

When I tried to sync my google drive on a ntfs partition, the following error occured.
After changing to ext4, no error occurs.

sync "./icons/myicon.png" created in remote. creating local
exception: /build/grive2-rauZp1/grive2-0.4.1/libgrive/src/util/OS.cc(81): Throw in function void gr::os::SetFileTime(const string&, const gr::DateTime&)
Dynamic exception type: boost::exception_detail::clone_impl<gr::os::Error>
[gr::expt::BacktraceTag*] = #0 0x477d00 grive gr::Exception::Exception()
#1 0x477151 grive gr::os::Error::Error()
#2 0x476e12 grive gr::os::SetFileTime(boost::filesystem::path const&, gr::DateTime const&)
#3 0x44d5ff grive gr::Syncer::Download(gr::Resource*, boost::filesystem::path const&)
#4 0x449df8 grive gr::Resource::SyncSelf(gr::Syncer*, gr::Val const&)
#5 0x44a237 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#6 0x44a358 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#7 0x44a358 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#8 0x44e5c8 grive gr::State::Sync(gr::Syncer*, gr::Val const&)
#9 0x443066 grive gr::Drive::Update()
#10 0x432cce grive Main(int, char**)
#11 0x430cab grive main
#12 0x7f2e724d1ec5 /lib/x86_64-linux-gnu/libc.so.6 __libc_start_main
#13 0x43181f grive 

1, "Operation not permitted"[boost::errinfo_file_name_*] = ./icons/myicon.png
[boost::errinfo_api_function_*] = utimes

Same problem as https://github.com/vitalif/grive2/issues/5

sync "./i/52.b" changed in local. uploading
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s

Latest release installed.

gr::AuthAgent::CheckHttpResponse exception

Hello,
after few lines (random) of sync an exception occurs. Restarting grive continues the sync then the exception again.
Here is the output (some parts overrided with XXXXX for privacy)

Reading local directories
Synchronizing folders
Reading remote server file list
Detecting changes from last sync
Synchronizing files
sync "./XXXXXXXX" deleted in local. deleting remote
sync "./XXXXXXX" deleted in local. deleting remote
sync "./XXXXXXXX" deleted in local. deleting remote
sync "./XXXXXXXX" deleted in local. deleting remote
sync "./XXXXXXXX" deleted in local. deleting remote
sync "./XXXXXXXXX deleted in local. deleting remote
sync "./XXXXXXXXX" deleted in local. deleting remote
exception: /home/mkauzlar/Downloads/grive2/libgrive/src/protocol/AuthAgent.cc(191): Throw in function long int gr::AuthAgent::CheckHttpResponse(long int, const string&, const gr::http::Header&)
Dynamic exception type: boost::exception_detail::clone_implgr::http::Error
[gr::http::HttpResponseTag_] = 412
[gr::http::UrlTag_] = https://www.googleapis.com/drive/v2/files/XXXXXXXXX/trash
[gr::http::HeaderTag*] = If-Match: "XXXXXXXXX"
Authorization: Bearer XXXXXXXXXXXXXX
GData-Version: 3.0

The whole drive sync (download) for the first time went ok (yesterday). This is happening now that I deleted some files and tried to resync.

Regards
M

Shared folders not synced

In google drive it is possible to add files/folders that are accessible by me (company domain access) to "My Drive". These folders have not explicitly been shared with me, but they are in "My Drive".

grive2 will successfully sync folders that have been explicitly shared with me. But not those I added to "My Drive"

In the logs I see this for all files within those shared folders:

file "<FILE-NAME>" parent doesn't exist, ignored

request failed with 412, retrying whole upload in 5s

grive -V:

sync "./XXXX/xxxx.xx1" already in sync
sync "./XXXX/xxxx.xx2" already in sync
sync ""./XXXX/xxxx.xx3" already in sync
sync "./XXXX/fileIchange.mmm" changed in local. uploading
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s

Some files not synching

I have just installed grive on two 14.04 machines using your private ppa and have gotten grive to sync with Google Drive. However, there are files owned by me (but shared with others) in a my main folder and subfolders on Google Drive that aren't being synced to my local repository. THese include .docx and .xlsx files.

Exception when initializing

ran grive -a on a fresh LinuxMINT system and it asked for my auth key which I got following the link provided and entered then it crashed as follows:

Reading local directories
exception: boost::filesystem::status: Too many levels of symbolic links: "./.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents/.wine/drive_c/users/bernd/My Documents"

compile failed

Hi, thank you so much for your efort 😃 But i have a problem. I can't compile the program 😞

aytac@manjaro ~/Documents/grive2/build$ cmake ..
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found libgcrypt: -lgcrypt -lgpg-error
-- Found CURL: /usr/lib64/libcurl.so (found version "7.42.0") 
-- Found EXPAT: /usr/lib64/libexpat.so (found version "2.1.0") 
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   program_options
--   filesystem
--   unit_test_framework
--   system
-- Found libbfd: /usr/lib64/libbfd.a
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.8") 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28") 
-- checking for module 'yajl'
--   found yajl, version 2.1.0
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   program_options
-- Configuring done
-- Generating done
-- Build files have been written to: /home/aytac/Documents/grive2/build
aytac@manjaro ~/Documents/grive2/build$ make -j4
Scanning dependencies of target grive
[  3%] [  3%] [  5%] [  7%] Building CXX object libgrive/CMakeFiles/grive.dir/src/base/ResourceTree.cc.o
Building CXX object libgrive/CMakeFiles/grive.dir/src/base/State.cc.o
Building CXX object libgrive/CMakeFiles/grive.dir/src/base/Syncer.cc.o
Building CXX object libgrive/CMakeFiles/grive.dir/src/base/Entry.cc.o
[  9%] Building CXX object libgrive/CMakeFiles/grive.dir/src/base/Drive.cc.o
[ 11%] Building CXX object libgrive/CMakeFiles/grive.dir/src/base/Resource.cc.o
[ 13%] Building CXX object libgrive/CMakeFiles/grive.dir/src/base/Feed.cc.o
[ 15%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive/Feed1.cc.o
[ 17%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive/Syncer1.cc.o
[ 19%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive/Entry1.cc.o
[ 21%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive2/Feed2.cc.o
[ 23%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive2/Syncer2.cc.o
[ 25%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive2/Entry2.cc.o
[ 27%] Building CXX object libgrive/CMakeFiles/grive.dir/src/http/CurlAgent.cc.o
[ 29%] Building CXX object libgrive/CMakeFiles/grive.dir/src/http/Header.cc.o
[ 31%] Building CXX object libgrive/CMakeFiles/grive.dir/src/http/XmlResponse.cc.o
[ 33%] Building CXX object libgrive/CMakeFiles/grive.dir/src/http/Download.cc.o
[ 35%] Building CXX object libgrive/CMakeFiles/grive.dir/src/http/StringResponse.cc.o
[ 37%] Building CXX object libgrive/CMakeFiles/grive.dir/src/http/ResponseLog.cc.o
[ 39%] Building CXX object libgrive/CMakeFiles/grive.dir/src/protocol/AuthAgent.cc.o
[ 41%] Building CXX object libgrive/CMakeFiles/grive.dir/src/protocol/OAuth2.cc.o
[ 43%] Building CXX object libgrive/CMakeFiles/grive.dir/src/json/JsonParser.cc.o
[ 45%] Building CXX object libgrive/CMakeFiles/grive.dir/src/json/JsonWriter.cc.o
[ 47%] Building CXX object libgrive/CMakeFiles/grive.dir/src/json/ValResponse.cc.o
[ 49%] Building CXX object libgrive/CMakeFiles/grive.dir/src/json/Val.cc.o
[ 50%] Building CXX object libgrive/CMakeFiles/grive.dir/src/json/ValBuilder.cc.o
[ 52%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/Crypt.cc.o
[ 54%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/StdStream.cc.o
[ 56%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/OS.cc.o
[ 58%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/Config.cc.o
[ 60%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/File.cc.o
[ 62%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/SignalHandler.cc.o
[ 64%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/Exception.cc.o
[ 66%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/DateTime.cc.o
[ 68%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/StringStream.cc.o
[ 70%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/MemMap.cc.o
[ 72%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/log/CompositeLog.cc.o
[ 74%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/log/DefaultLog.cc.o
[ 76%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/log/Log.cc.o
[ 78%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/log/CommonLog.cc.o
[ 80%] Building CXX object libgrive/CMakeFiles/grive.dir/src/xml/String.cc.o
[ 82%] [ 84%] Building CXX object libgrive/CMakeFiles/grive.dir/src/xml/Node.cc.o
Building CXX object libgrive/CMakeFiles/grive.dir/src/xml/TreeBuilder.cc.o
[ 86%] Building CXX object libgrive/CMakeFiles/grive.dir/src/xml/NodeSet.cc.o
[ 88%] Building CXX object libgrive/CMakeFiles/grive.dir/src/bfd/Backtrace.cc.o
[ 90%] Building CXX object libgrive/CMakeFiles/grive.dir/src/bfd/SymbolInfo.cc.o
In file included from /home/aytac/Documents/grive2/libgrive/src/bfd/SymbolInfo.cc:25:0:
/usr/include/bfd.h:35:2: error: #error config.h must be included before this header
 #error config.h must be included before this header
  ^
[ 92%] Building CXX object libgrive/CMakeFiles/grive.dir/src/bfd/Debug.cc.o
libgrive/CMakeFiles/grive.dir/build.make:1089: recipe for target 'libgrive/CMakeFiles/grive.dir/src/bfd/SymbolInfo.cc.o' failed
make[2]: *** [libgrive/CMakeFiles/grive.dir/src/bfd/SymbolInfo.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:112: recipe for target 'libgrive/CMakeFiles/grive.dir/all' failed
make[1]: *** [libgrive/CMakeFiles/grive.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

Unicode handling

Using 0.4.0_pre20151011

Having issues trying to sync files with unicode in their name. In this case, an accent í.

sync "./Arquitectura/Proyecto Ejecutivo/DWG/Telefonía (Unicode Encoding Conflict).dwg" deleted in remote. deleting local
sync "./Arquitectura/Proyecto Ejecutivo/DWG/Telefonía.dwg" created in remote. creating local
HTTP GET "https://doc-10-b0-docs.googleusercontent.com/docs/securesc/q6nssdfasdfasdfpiod/349asdfasdpfr5r6tcv0n1jgs5bcu7d787/1451721602342300/2342342342/14058976363759233566/0BwxDczasdfSHKWlOjaKADSDLnc?h=234242423423&e=download&gd=true"
HTTP response 200
exception: /var/tmpfs/portage/net-misc/grive-0.4.0_pre20151011/work/grive-0.4.0_pre20151011/libgrive/src/util/OS.cc(81): Throw in function void gr::os::SetFileTime(const string&, const gr::DateTime&)
Dynamic exception type: boost::exception_detail::clone_implgr::os::Error
[gr::expt::BacktraceTag*] = #0 0x489a8c grive gr::Exception::Exception()
#1 0x483051 grive gr::os::Error::Error()
#2 0x482b7c grive gr::os::SetFileTime(std::string const&, gr::DateTime const&)
#3 0x4944df grive gr::Syncer::Download(gr::Resource*, boost::filesystem::path const&)
#4 0x458fa1 grive gr::Resource::SyncSelf(gr::Syncer*, gr::Val const&)
#5 0x4594db grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#6 0x4595f0 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#7 0x4595f0 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#8 0x4595f0 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#9 0x4595f0 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#10 0x4404c8 grive gr::State::Sync(gr::Syncer*, gr::Val const&)
#11 0x45bfe0 grive gr::Drive::Update()
#12 0x432665 grive Main(int, char**)
#13 0x4306cb grive main
#14 0x7f512830c6a5 /lib64/libc.so.6 __libc_start_main
#15 0x4313e9 grive _start

2, "No such file or directory"[boost::errinfo_file_name__] = ./Arquitectura/Proyecto Ejecutivo/DWG/Telefonía.dwg
[boost::errinfo_api_function__] = utimes

Does not link properly when yajl is built from source

On older systems (Ubuntu 12.04), yajl must be built from source. It compiles to libyajl.so and libyajl_s.a. Grive assumes that pkg_config will only find a static library, which is not the case here (.so is found by default).

request failed with 412: Precondition Failed

running the build from 8/10/2015 and I'm getting a lot of these:

request failed with 412, body: {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "conditionNotMet",
    "message": "Precondition Failed",
    "locationType": "header",
    "location": "If-Match"
   }
  ],
  "code": 412,
  "message": "Precondition Failed"
 }
}
. retrying whole upload in 5s

human response on disk full

Когда кончается место на гугл-диске, сейчас в ответ слышна вот такая ругань:
exception: /backup/gd/grive2-master/libgrive/src/protocol/AuthAgent.cc(191): Throw in function long gr::AuthAgent::CheckHttpResponse(long, const std::string &, const http::Header &)
Dynamic exception type: N5boost16exception_detail10clone_implIN2gr4http5ErrorEEE
[PN2gr4http9HeaderTagE] = Content-Type: application/octet-stream
Content-Length: 379886405
If-Match: "AmpO9uzbs3m4f4SIcYKV4LhQRzY/MTQzMzEwNDI2MzQxOQ"
Authorization: Bearer ya29.hAGCyefQKfacEexK8TXmHesJOPTBxelC__Wm2bahs5PttRq4sdIliRltQtmUAy9LPWElf_DJ4WkddA
GData-Version: 3.0

[PN2gr4http6UrlTagE] = https://www.googleapis.com/upload/drive/v2/files/0B4F..

[PN2gr4http15HttpResponseTagE] = 403

Хотелось бы вразумительного сообщения на русском, дескать, у вас не хватает места.

Google Documents downloading behavior

If you happen to have Google Documents on your drive, grive2 will download them as gdoc or gsheet files, instead of ignoring them.

As far as I can tell, it seems to be behaving like that:

  1. grive sees a google drive file on server
  2. it downloads it (creates file with format gdoc or gsheet)
  3. it uploads it since it's a new file.
    Finally, for each document, you end up with two files on server: the real google doc file and a .gdoc or .gsheet useless copy.

Thank you very much.

Error building with yajl 1.0.7

Hi,

My OS is CentOS 6.4. I have yajl 1.0.7 installed and I get the following build errors:

libgrive.a(JsonWriter.cc.o): In function JsonWriter': /home/janik/Downloads/grive2/libgrive/src/json/JsonWriter.cc:43: undefined reference toyajl_gen_config'
libgrive.a(JsonParser.cc.o): In function gr::JsonParser::Finish()': /home/janik/Downloads/grive2/libgrive/src/json/JsonParser.cc:186: undefined reference toyajl_complete_parse'
collect2: ld returned 1 exit status

Is it possible that the function signatures have changed? What is the version of yajl that is required?

Exception thrown when file disappears while being uploaded

I ran grive -s Documents while I had a document open, and then I closed the document while grive was still running, resulting in the following crash:

sync "./Documents/school/cmpt433/project/writeups/.~lock.Project Writeup.docx#" doesn't exist in server, uploading
exception: /build/grive2-RaR4H3/grive2-0.4.1/libgrive/src/util/File.cc(128): Throw in function void gr::File::Open(const boost::filesystem::path&, int, int)
Dynamic exception type: boost::exception_detail::clone_impl<gr::File::Error>
[gr::expt::BacktraceTag*] = #0 0x506f9e grive gr::Exception::Exception()
#1 0x502a1b grive gr::File::Error::Error()
#2 0x501ee9 grive gr::File::Open(boost::filesystem::path const&, int, int)
#3 0x501fad grive gr::File::OpenForRead(boost::filesystem::path const&)
#4 0x501c92 grive gr::File::File(boost::filesystem::path const&)
#5 0x4e117e grive gr::v2::Syncer2::Upload(gr::Resource*)
#6 0x4e00aa grive gr::v2::Syncer2::Create(gr::Resource*)
#7 0x4d1efe grive gr::Resource::SyncSelf(gr::Syncer*, gr::Val const&)
#8 0x4d1b96 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#9 0x4d5f37 grive boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource*, gr::Syncer*, gr::DateTime&, gr::Val const&) const
#10 0x4d542b grive void boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1<gr::Resource*&> >(boost::_bi::type<void>, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1<gr::Resource*&>&, int)
#11 0x4d47e8 grive void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > >::operator()<gr::Resource*>(gr::Resource*&)
#12 0x4d3c81 grive boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > >)
#13 0x4d1c9a grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#14 0x4d5f37 grive boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource*, gr::Syncer*, gr::DateTime&, gr::Val const&) const
#15 0x4d542b grive void boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1<gr::Resource*&> >(boost::_bi::type<void>, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1<gr::Resource*&>&, int)
#16 0x4d47e8 grive void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > >::operator()<gr::Resource*>(gr::Resource*&)
#17 0x4d3c81 grive boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > >)
#18 0x4d1c9a grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#19 0x4d5f37 grive boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource*, gr::Syncer*, gr::DateTime&, gr::Val const&) const
#20 0x4d542b grive void boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1<gr::Resource*&> >(boost::_bi::type<void>, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1<gr::Resource*&>&, int)
#21 0x4d47e8 grive void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > >::operator()<gr::Resource*>(gr::Resource*&)
#22 0x4d3c81 grive boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > >)
#23 0x4d1c9a grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#24 0x4d5f37 grive boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource*, gr::Syncer*, gr::DateTime&, gr::Val const&) const
#25 0x4d542b grive void boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1<gr::Resource*&> >(boost::_bi::type<void>, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1<gr::Resource*&>&, int)
#26 0x4d47e8 grive void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > >::operator()<gr::Resource*>(gr::Resource*&)
#27 0x4d3c81 grive boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > >)
#28 0x4d1c9a grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#29 0x4d5f37 grive boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource*, gr::Syncer*, gr::DateTime&, gr::Val const&) const
#30 0x4d542b grive void boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1<gr::Resource*&> >(boost::_bi::type<void>, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1<gr::Resource*&>&, int)
#31 0x4d47e8 grive void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > >::operator()<gr::Resource*>(gr::Resource*&)
#32 0x4d3c81 grive boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > >)
#33 0x4d1c9a grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#34 0x4d5f37 grive boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource*, gr::Syncer*, gr::DateTime&, gr::Val const&) const
#35 0x4d542b grive void boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> >::operator()<boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list1<gr::Resource*&> >(boost::_bi::type<void>, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>&, boost::_bi::list1<gr::Resource*&>&, int)
#36 0x4d47e8 grive void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > >::operator()<gr::Resource*>(gr::Resource*&)
#37 0x4d3c81 grive boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > > std::for_each<__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > > >(__gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, __gnu_cxx::__normal_iterator<gr::Resource**, std::vector<gr::Resource*, std::allocator<gr::Resource*> > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>, boost::_bi::list4<boost::arg<1>, boost::_bi::value<gr::Syncer*>, boost::reference_wrapper<gr::DateTime>, boost::_bi::value<gr::Val> > >)
#38 0x4d1c9a grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#39 0x4db8a9 grive gr::State::Sync(gr::Syncer*, gr::Val const&)
#40 0x4ce318 grive gr::Drive::Update()
#41 0x4ac1a9 grive Main(int, char**)
#42 0x4acd33 grive main
#43 0x7fd0cc081ec5 /lib/x86_64-linux-gnu/libc.so.6 __libc_start_main
#44 0x4aad99 grive 

2, "No such file or directory"[boost::errinfo_file_name_*] = ./Documents/school/cmpt433/project/writeups/.~lock.Project Writeup.docx#
[boost::errinfo_api_function_*] = open

I don't know what the ideal behaviour would be when a file disappears; maybe just ignore it, and move on to the next file?

(I'm running version 0.4.2-pre from the webupd8 PPA)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.