•  Evandro
  • 53.6% (Neutral)
  • YAF Forumling Topic Starter
I find another little bug in 1.9.3 and I think also in 1.9.4RC1, the forum does'n delete the attached files from HardDisk because is missing the .yafupload extension in a String.Format.
Whent I upload a file the forum give the .yafupload extension, like 'MyImage.jpg.yafupload', saving into the uploaddir, but into the DB it store only the filename.

the code to delete an attachment actually is in the YAF.Classes.Data.DB class

static public void attachment_delete( object attachmentID )
System.IO.File.Delete(String.Format("{0}{1}.{2}", sUpDir, row["MessageID"], row["FileName"]));
the right code is:

System.IO.File.Delete(String.Format("{0}{1}.{2}.yafupload", sUpDir, row["MessageID"], row["FileName"]));

like the code when the file is saved on disk
  •  Jaben
  • 100% (Exalted)
  • YAF Developer
Thank you.

Committed to SVN Rev #3052

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved