Hi all, i am hoping someone can confirm this. Essentially if you try to empty the recycle bin for the media section it hangs. This only happens if the items have files uploaded against them. I have debugged the source code and found the error is an IO directory not empty one.
I can confirm this has happened on a fresh install of Umbraco 4.9.0
Looking at the code in file umbraco.cms/businesslogic/Content.cs, there is a method called DeleteAssociatedMediaFiles and the command that triggers the delete is
fs.DeleteDirectory(parentDirectory);
if i change this to
fs.DeleteDirectory(parentDirectory, true);
it deletes the file, folder and any other files that may be in the folder, this is good if i am using imagegen as it will automatically delete all of the imagegen files/folders as well.
I am not sure if this will have unforeseen consequences can someone let me know if this is the right way to get the Media recycle bin to work correctly.
Emptying the media recycle bin
Hi all, i am hoping someone can confirm this. Essentially if you try to empty the recycle bin for the media section it hangs. This only happens if the items have files uploaded against them. I have debugged the source code and found the error is an IO directory not empty one.
I can confirm this has happened on a fresh install of Umbraco 4.9.0
Looking at the code in file umbraco.cms/businesslogic/Content.cs, there is a method called DeleteAssociatedMediaFiles and the command that triggers the delete is
fs.DeleteDirectory(parentDirectory);
if i change this to
fs.DeleteDirectory(parentDirectory, true);
it deletes the file, folder and any other files that may be in the folder, this is good if i am using imagegen as it will automatically delete all of the imagegen files/folders as well.
I am not sure if this will have unforeseen consequences can someone let me know if this is the right way to get the Media recycle bin to work correctly.
Thanks
Hi Asif,
I believe this has been fixed for v4.10.
Refs: http://issues.umbraco.org/issue/U4-771 and http://issues.umbraco.org/issue/U4-908
Cheers, Lee.
Hi Lee thanks for the qucik update, do you have a planned date for releasing 4.10 ?
Release date for v4.10 is currently Friday 26th October. (More details here: http://umbraco.com/follow-us/blog-archive/2012/10/9/quality-is-key.aspx)
Nice one thx Lee
is working on a reply...