File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
RemoteFile/RemoteHandlers Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -260,8 +260,14 @@ public override byte[] DownloadCertificateFile(string path)
260260
261261 bool scpError = false ;
262262
263+ _logger . LogDebug ( $ "Download path: { downloadPath } ") ;
264+ _logger . LogDebug ( $ "IsStoreServerLinux: { IsStoreServerLinux } ") ;
265+ _logger . LogDebug ( $ "FileTransferProtocol: { FileTransferProtocol } ") ;
266+ bool attemptedDownload = false ;
267+
263268 if ( FileTransferProtocol == ApplicationSettings . FileTransferProtocolEnum . Both || FileTransferProtocol == ApplicationSettings . FileTransferProtocolEnum . SCP )
264269 {
270+ _logger . LogDebug ( $ "Attempting SCP download...") ;
265271 using ( ScpClient client = new ScpClient ( Connection ) )
266272 {
267273 try
@@ -288,6 +294,7 @@ public override byte[] DownloadCertificateFile(string path)
288294 }
289295 finally
290296 {
297+ attemptedDownload = true ;
291298 client . Disconnect ( ) ;
292299 }
293300 }
@@ -317,10 +324,17 @@ public override byte[] DownloadCertificateFile(string path)
317324 }
318325 finally
319326 {
327+ attemptedDownload = true ;
320328 client . Disconnect ( ) ;
321329 }
322330 }
323331 }
332+ if ( ! attemptedDownload )
333+ {
334+ FileTransferProtocol = ApplicationSettings . FileTransferProtocolEnum . Both ;
335+ _logger . LogDebug ( $ "No download attempted. Setting FileTransferProtocol to Both and retrying download.") ;
336+ return DownloadCertificateFile ( path ) ;
337+ }
324338
325339 if ( ! string . IsNullOrEmpty ( ApplicationSettings . SeparateUploadFilePath ) && IsStoreServerLinux )
326340 {
You can’t perform that action at this time.
0 commit comments