#18863: Orchard.Media : MetaWeblogNewMediaObject doesn't delete a file without directory name

--HG--
branch : 1.x
This commit is contained in:
agriffard@hotmail.com
2012-08-23 13:30:47 +02:00
parent f2bb3ee47a
commit a204025491

View File

@@ -73,7 +73,7 @@ namespace Orchard.Media.Services {
try {
// delete the file if it already exists, e.g. an updated image in a blog post
// it's safe to delete the file as each content item gets a specific folder
_mediaService.DeleteFile(Path.GetDirectoryName(name), Path.GetFileName(name));
_mediaService.DeleteFile(directoryName, Path.GetFileName(name));
}
catch {
// current way to delete a file if it exists