Author Topic: Downloading file not working when downloading from a folder  (Read 1703 times)

Raj1v

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Downloading file not working when downloading from a folder
« 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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Downloading file not working when downloading from a folder
« Reply #1 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).