From 1fb7697037b25f222472a036b3c7eb5112cefeea Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 5 Jan 2016 13:19:46 +0100 Subject: [PATCH] First try to map using smb Fallback to webdav if smb doesn't work --- softwares/FWSUpdates/bin/sync.bat | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/softwares/FWSUpdates/bin/sync.bat b/softwares/FWSUpdates/bin/sync.bat index 05cf0a3..e62060b 100644 --- a/softwares/FWSUpdates/bin/sync.bat +++ b/softwares/FWSUpdates/bin/sync.bat @@ -40,10 +40,15 @@ FOR %%D IN (e f g h i j k l m n o p q r s t u v w x y z) do ( echo %DATE% %TIME% - couldn't find any free drive letter > %SystemDrive%\FWSUpdates\status\sync_log.txt goto :EOF :drivefound -net use %DRIVE%: %REPO% /PERSISTENT:NO /USER:%USER% %PASS% 1>NUL 2>NUL +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% >> %SystemDrive%\FWSUpdates\status\sync_log.txt + 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 ) REM and if wpkg.js exists