From 1c6b923f19c37b8e732ef5abc576412a34fe265a Mon Sep 17 00:00:00 2001 From: Jean-Christophe Saad-Dupuy Date: Mon, 14 Jul 2014 16:25:53 +0200 Subject: [PATCH] fix(burn_after_reading): fixes self reference in _purge_file --- zerobin/paste.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zerobin/paste.py b/zerobin/paste.py index 7b9f1c7..578f7fa 100644 --- a/zerobin/paste.py +++ b/zerobin/paste.py @@ -303,6 +303,7 @@ class Paste(object): ignore_files = ['counter', ] # keep a count on purged pastes deleted_paste = 0 + if os.path.exists(path): for folder, _ , files in os.walk(path): for fname in files: @@ -324,7 +325,7 @@ class Paste(object): paste = Paste.load_from_file(fname) # Burn after reading will always returns paste.is_alive == False # We don't want to kill them now - if not self.is_burn_notice and not paste.is_alive: + if not paste.is_burn_notice and not paste.is_alive: paste.delete() return True return False