diff --git a/softwares/FWSUpdates/bin/sync.bat b/softwares/FWSUpdates/bin/sync.bat index e62060b..0c3e0ba 100644 --- a/softwares/FWSUpdates/bin/sync.bat +++ b/softwares/FWSUpdates/bin/sync.bat @@ -43,13 +43,12 @@ goto :EOF net use %DRIVE%: %REPO_SMB% /PERSISTENT:NO /USER:%USER% %PASS% 1>NUL 2>NUL REM Check if mapping worked IF %ERRORLEVEL% NEQ 0 ( - echo %DATE% %TIME% - Error mapping %REPO_SMB%, lets try webdav >> %SystemDrive%\FWSUpdates\status\sync_log.txt - goto cleanup -) -net use %DRIVE%: %REPO_WEB% /PERSISTENT:NO /USER:%USER% %PASS% 1>NUL 2>NUL -IF %ERRORLEVEL% NEQ 0 ( - echo %DATE% %TIME% - Error mapping %REPO_WEB% >> %SystemDrive%\FWSUpdates\status\sync_log.txt - goto cleanup + echo %DATE% %TIME% - Error mapping %REPO_SMB% (using CIFS^), lets try webdav >> %SystemDrive%\FWSUpdates\status\sync_log.txt + net use %DRIVE%: %REPO_WEB% /PERSISTENT:NO /USER:%USER% %PASS% 1>NUL 2>NUL + IF !ERRORLEVEL! NEQ 0 ( + echo %DATE% %TIME% - Error mapping %REPO_WEB% (using WEBDAV^), giving up >> %SystemDrive%\FWSUpdates\status\sync_log.txt + goto cleanup + ) ) REM and if wpkg.js exists IF NOT EXIST "%DRIVE%:\wpkg.js" (