mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 05:15:40 +03:00
Make progress aware of errors, first step.
This commit is contained in:
parent
f5bbb12434
commit
84e8ab5b71
3 changed files with 10 additions and 2 deletions
|
@ -251,7 +251,7 @@ int CSyncThread::treewalkError(TREE_WALK_FILE* file)
|
|||
|
||||
if( file &&
|
||||
(file->instruction == CSYNC_INSTRUCTION_STAT_ERROR ||
|
||||
file->instruction == CSYNC_INSTRUCTION_ERROR) ) {
|
||||
file->instruction == CSYNC_INSTRUCTION_ERROR) ) {
|
||||
_mutex.lock();
|
||||
_syncedItems[indx]._instruction = file->instruction;
|
||||
_mutex.unlock();
|
||||
|
@ -434,6 +434,9 @@ Progress::Kind CSyncThread::csyncToProgressKind( enum csync_notify_type_e kind )
|
|||
case CSYNC_NOTIFY_FINISHED_SYNC_SEQUENCE:
|
||||
pKind = Progress::EndSync;
|
||||
break;
|
||||
case CSYNC_NOTIFY_ERROR:
|
||||
pKind = Progress::Error;
|
||||
break;
|
||||
default:
|
||||
pKind = Progress::Invalid;
|
||||
break;
|
||||
|
|
|
@ -87,6 +87,10 @@ void ProgressDispatcher::setProgressInfo(const QString& folder, Progress::Info n
|
|||
return;
|
||||
}
|
||||
|
||||
if( newProgress.kind == Progress::Error ) {
|
||||
const char *msg = (const char*)newProgress.file_size;
|
||||
qDebug() << "Progress-Error:" << QString::fromLocal8Bit(msg);
|
||||
}
|
||||
if( newProgress.kind == Progress::EndSync ) {
|
||||
newProgress.overall_current_bytes = newProgress.overall_transmission_size;
|
||||
newProgress.current_file_no = newProgress.overall_file_count;
|
||||
|
|
|
@ -37,7 +37,8 @@ public:
|
|||
StartUpload,
|
||||
EndDownload,
|
||||
EndUpload,
|
||||
EndSync
|
||||
EndSync,
|
||||
Error
|
||||
};
|
||||
typedef ProgressKind_s Kind;
|
||||
|
||||
|
|
Loading…
Reference in a new issue