Skip to content

Commit bd1f418

Browse files
author
virco
committed
fix
1 parent a30285e commit bd1f418

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

psynclib.c

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,17 +1637,28 @@ psync_folderid_t *psync_crypto_folderids(){
16371637
return ret;
16381638
}
16391639

1640-
/*external_status psync_filesystem_status(char *path) {
1641-
return do_psync_external_status(path);
1640+
external_status psync_filesystem_status(const char *path) {
1641+
switch (psync_path_status_get_status(psync_path_status_get(path))) {
1642+
case PSYNC_PATH_STATUS_IN_SYNC:
1643+
return INSYNC;
1644+
case PSYNC_PATH_STATUS_IN_PROG:
1645+
return INPROG;
1646+
case PSYNC_PATH_STATUS_PAUSED:
1647+
case PSYNC_PATH_STATUS_REMOTE_FULL:
1648+
case PSYNC_PATH_STATUS_LOCAL_FULL:
1649+
return NOSYNC;
1650+
default:
1651+
return INVSYNC;
1652+
}
16421653
}
16431654

16441655
external_status psync_status_file(const char *path) {
1645-
return do_psync_external_status_file(path);
1656+
return psync_filesystem_status(path);
16461657
}
16471658

16481659
external_status psync_status_folder(const char *path) {
1649-
return do_psync_external_status_folder(path);
1650-
}*/
1660+
return psync_filesystem_status(path);
1661+
}
16511662

16521663
int64_t psync_file_public_link(const char *path, char **code /*OUT*/, char **err /*OUT*/) {
16531664
return do_psync_file_public_link(path, code, err, 0, 0, 0);

psynclib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ psync_folderid_t *psync_crypto_folderids();
10211021
* of the drive and/or drive letter. Can be used for synced folders. For files and folders not in drive or sync folder INSYNC is returned.
10221022
*/
10231023

1024-
external_status psync_filesystem_status(char *path);
1024+
external_status psync_filesystem_status(const char *path);
10251025
external_status psync_status_file(const char *path);
10261026
external_status psync_status_folder(const char *path);
10271027

0 commit comments

Comments
 (0)