Skip to content

Commit d729ad4

Browse files
author
virco
committed
fix
1 parent 53bf2ae commit d729ad4

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

ppathstatus.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "pcloudcrypto.h"
3434
#include "ptree.h"
3535
#include "ptasks.h"
36+
#include "pstatus.h"
3637
#include <string.h>
3738
#include <ctype.h>
3839

@@ -741,8 +742,17 @@ static psync_path_status_t rdunlock_return(psync_path_status_t st) {
741742
}
742743

743744
static psync_path_status_t rdunlock_return_in_prog() {
745+
static const uint32_t requiredstatuses[]={
746+
PSTATUS_COMBINE(PSTATUS_TYPE_RUN, PSTATUS_RUN_RUN),
747+
PSTATUS_COMBINE(PSTATUS_TYPE_ONLINE, PSTATUS_ONLINE_CONNECTING|PSTATUS_ONLINE_SCANNING|PSTATUS_ONLINE_ONLINE),
748+
PSTATUS_COMBINE(PSTATUS_TYPE_ACCFULL, PSTATUS_ACCFULL_QUOTAOK),
749+
PSTATUS_COMBINE(PSTATUS_TYPE_DISKFULL, PSTATUS_DISKFULL_OK)
750+
};
744751
psync_sql_rdunlock();
745-
return PSYNC_PATH_STATUS_IN_PROG;
752+
if (psync_statuses_ok_array(requiredstatuses, ARRAY_SIZE(requiredstatuses)))
753+
return PSYNC_PATH_STATUS_IN_PROG;
754+
else
755+
return PSYNC_PATH_STATUS_PAUSED; //TODO: fix to return proper status
746756
}
747757

748758
static psync_path_status_t psync_path_status_drive_folder_locked(psync_folderid_t folderid) {

0 commit comments

Comments
 (0)