Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: Raj1v on December 25, 2013, 06:31:22 PM

Title: Downloading file not working when downloading from a folder
Post by: Raj1v on December 25, 2013, 06:31:22 PM
Hi,

I have a problem when downloading a file from the server when downloading from a folder.
This is my code :
  1. BinaryWriter downloadedFile = TNManager.BeginSend(Packet.RequestLoadFile);
  2.                         downloadedFile.Write("testfolder/testfile.txt");
  3.                         TNManager.EndSend();
The file gets saved as empty on the client PC.
When I don't download from a folder it works fine.
Title: Re: Downloading file not working when downloading from a folder
Post by: ArenMook on December 26, 2013, 07:00:47 PM
The directory must exist for this to work if I recall correctly. Check TNFileServer.cs, line 54 (FileServer.SaveFile function).