Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ignoring files with missing MD5 checksum in remote feeds

  • Loading branch information...
commit 94383e0030d8d0e3b06e90e52eb443d4aa99b488 1 parent 593c335
@nestal nestal authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 libgrive/src/drive/Resource.cc
View
11 libgrive/src/drive/Resource.cc
@@ -209,6 +209,14 @@ void Resource::FromRemoteFile( const Entry& remote, const DateTime& last_sync )
}
}
+ // remote checksum unknown, assume the file is not changed in remote
+ else if ( remote.MD5().empty() )
+ {
+ Log( "file %1% has unknown checksum in remote. assuned in sync",
+ Path(), log::verbose ) ;
+ m_state = sync ;
+ }
+
// if checksum is equal, no need to compare the mtime
else if ( remote.MD5() == m_md5 )
{
@@ -259,10 +267,7 @@ void Resource::FromLocal( const DateTime& last_sync )
// remote_deleted first, it will be updated to sync/remote_changed
// in FromRemote()
else
- {
m_state = ( m_mtime > last_sync ? local_new : remote_deleted ) ;
-// Trace( "file %1% mtime %2%, last_sync %3%, state (%4%)", path, m_mtime, last_sync, m_state ) ;
- }
m_name = Path2Str( path.filename() ) ;
m_kind = fs::is_directory(path) ? "folder" : "file" ;
Please sign in to comment.
Something went wrong with that request. Please try again.