delete trashed files when emptying trash
Ticket
+commit
+issues
delete all files not associated with a nontrashed card.
John said: "Make sure to check even if the current cardtype is not file or image - it may have been changed."
--Ethan McCutchen.....2013-05-06 02:37:03 +0000
there is no "current card" when emptying trash.
--Ethan McCutchen.....2013-05-06 02:37:40 +0000
you mean cards in the trash don't have a cardtype?
--John Abbe.....2013-05-06 03:17:53 +0000
I mean you empty all the trash at once, not card by card. perhaps the code will explain it best:
def empty_trash
Card.where(:trash=>true).delete_all
User.delete_cardless
Card::Revision.delete_cardless
Card::Reference.repair_missing_referees
end
At no point in the process do you examine any card details. We would basically add another line that is essentially "delete cardless files". (And, of course, make that work)
--Ethan McCutchen.....2013-05-06 04:04:44 +0000