mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
Fix fileStatus API.
Conflicts: src/mirall/owncloudfolder.cpp
This commit is contained in:
parent
0aa403eca3
commit
993d33f779
1 changed files with 51 additions and 0 deletions
|
@ -332,5 +332,56 @@ void ownCloudFolder::wipe()
|
|||
_wipeDb = false;
|
||||
}
|
||||
|
||||
SyncFileStatus ownCloudFolder::fileStatus( const QString& file )
|
||||
{
|
||||
if( file.isEmpty() ) return STATUS_NONE;
|
||||
|
||||
foreach( const SyncFileItem item, _items ) {
|
||||
qDebug() << "FileStatus compare: " << item.file << " <> " << file;
|
||||
|
||||
if( item.file == file ) {
|
||||
switch( item.instruction ) {
|
||||
case CSYNC_INSTRUCTION_NONE:
|
||||
return STATUS_NONE;
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_EVAL:
|
||||
return STATUS_EVAL;
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_RENAME:
|
||||
return STATUS_RENAME;
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_NEW:
|
||||
return STATUS_NEW;
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_CONFLICT:
|
||||
return STATUS_CONFLICT;
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_IGNORE:
|
||||
return STATUS_IGNORE;
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_SYNC:
|
||||
return STATUS_SYNC;
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_STAT_ERROR:
|
||||
return STATUS_STAT_ERROR;
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_ERROR:
|
||||
return STATUS_ERROR;
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_DELETED:
|
||||
return STATUS_DELETED;
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_UPDATED:
|
||||
return STATUS_UPDATED;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return STATUS_NEW;
|
||||
}
|
||||
|
||||
} // ns
|
||||
|
||||
|
|
Loading…
Reference in a new issue