Skip to content

Commit

Permalink
Merge pull request #77 from madjar/master
Browse files Browse the repository at this point in the history
Fixed a bug where grive crashed on the first run.
  • Loading branch information
nestal committed Jun 27, 2012
2 parents 460a4fd + 34be2e7 commit dc89aee
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions libgrive/src/drive/Drive.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,17 @@ void Drive::UpdateChangeStamp( http::Agent *http )
http::XmlResponse xrsp ;

// get changed feed
boost::format changes_uri( "https://docs.google.com/feeds/default/private/changes?start-index=%1%" ) ;
http->Get( (changes_uri%(m_state.ChangeStamp()+1)).str(), &xrsp, m_http_hdr ) ;
std::string url;
if (m_state.ChangeStamp() != -1)
{
boost::format changes_uri( "https://docs.google.com/feeds/default/private/changes?start-index=%1%" ) ;
url = (changes_uri%(m_state.ChangeStamp()+1)).str();
}
else
{
url = "https://docs.google.com/feeds/default/private/changes";
}
http->Get( url, &xrsp, m_http_hdr ) ;

// we should go through the changes to see if it was really Grive to made that change
// maybe by recording the updated timestamp and compare it?
Expand Down

0 comments on commit dc89aee

Please sign in to comment.