fix:add windows support

This commit is contained in:
wangmm0220 2023-11-03 17:56:34 +08:00
parent 5a6c3f2b04
commit b1515dd069
1 changed files with 4 additions and 0 deletions

View File

@ -157,7 +157,11 @@ int uploadRsync(char* id, char* path){
changeDirFromWindowsToLinux(path, pathTransform);
#endif
char command[PATH_MAX] = {0};
#ifdef WINDOWS
if(pathTransform[strlen(pathTransform) - 1] != '/'){
#else
if(path[strlen(path) - 1] != '/'){
#endif
snprintf(command, PATH_MAX, "rsync -av --delete --timeout=10 --bwlimit=100000 %s/ rsync://%s/checkpoint/%s/",
#ifdef WINDOWS
pathTransform