@@ -763,12 +763,12 @@ private async Task downloadSplitFiles(FileManagerDirectoryContent itemFile, Bson
763763 List < string > splitPaths = new List < string > ( ) ;
764764 foreach ( int messageId in file . ListMessageId )
765765 {
766- string filePathPart = System . IO . Path . Combine ( currentFilePath , $ "({ i } )" + itemFile . Name ) ;
767- await downloadFromTelegram ( dbName , messageId , filePathPart , file , true ) ;
766+ string filePathPart = Path . Combine ( currentFilePath , $ "({ i } )" + itemFile . Name ) ;
767+ await downloadFromTelegram ( dbName , messageId , filePathPart , file , true , Path . Combine ( currentFilePath , itemFile . Name ) ) ;
768768 splitPaths . Add ( filePathPart ) ;
769769 i ++ ;
770770 }
771- await mergeFileStreamAsync ( splitPaths , System . IO . Path . Combine ( currentFilePath , itemFile . Name ) ) ;
771+ await mergeFileStreamAsync ( splitPaths , Path . Combine ( currentFilePath , itemFile . Name ) ) ;
772772 foreach ( string filePath in splitPaths )
773773 {
774774 File . Delete ( filePath ) ;
@@ -800,9 +800,10 @@ public static void functionCalll(string dbName, int messageId, string destPath)
800800 {
801801
802802 }
803- private async Task downloadFromTelegram ( string dbName , int messageId , string destPath , BsonFileManagerModel file = null , bool shouldWait = false )
803+ private async Task downloadFromTelegram ( string dbName , int messageId , string destPath , BsonFileManagerModel file = null , bool shouldWait = false , string path = null )
804804 {
805805 DownloadModel model = new DownloadModel ( ) ;
806+ model . path = path ?? destPath ;
806807 model . tis = _tis ;
807808 if ( file != null )
808809 {
0 commit comments