Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Asif Malik 203 posts 339 karma points
    Oct 12, 2012 @ 11:17
    Asif Malik
    0

    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

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Oct 12, 2012 @ 12:14
    Lee Kelleher
    0

    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.

  • Asif Malik 203 posts 339 karma points
    Oct 12, 2012 @ 13:07
    Asif Malik
    0

    Hi Lee thanks for the qucik update, do you have a planned date for releasing 4.10 ?

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Oct 12, 2012 @ 13:10
    Lee Kelleher
    0

    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)

  • Asif Malik 203 posts 339 karma points
    Oct 12, 2012 @ 13:11
    Asif Malik
    0

    Nice one thx Lee

Please Sign in or register to post replies

Write your reply to:

Draft