Added code to auto seek stream to begining when saving via IFileSystem just in case

This commit is contained in:
Matt@MBP13-PC
2012-08-20 10:51:14 -01:00
parent 2775d9bedc
commit 3e2510cbda

View File

@@ -83,6 +83,9 @@ namespace Umbraco.Core.IO
EnsureDirectory(Path.GetDirectoryName(path));
if (stream.CanSeek)
stream.Seek(0, 0);
using (var destination = (Stream)File.Create(GetFullPath(path)))
stream.CopyTo(destination);
}