aboutsummaryrefslogtreecommitdiff
path: root/lib/components/file_eraser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/components/file_eraser.cpp')
-rw-r--r--lib/components/file_eraser.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/components/file_eraser.cpp b/lib/components/file_eraser.cpp
index bc26bf7c..6cacf045 100644
--- a/lib/components/file_eraser.cpp
+++ b/lib/components/file_eraser.cpp
@@ -26,14 +26,13 @@ void eBackgroundFileEraser::idle()
eBackgroundFileEraser::~eBackgroundFileEraser()
{
messages.send(Message::quit);
- if ( thread_running() )
- kill();
if (instance==this)
instance=0;
}
void eBackgroundFileEraser::thread()
{
+ hasStarted();
nice(5);
reset();
runLoop();
@@ -51,8 +50,7 @@ void eBackgroundFileEraser::erase(const char *filename)
else
{
messages.send(Message(Message::erase, strdup(buf)));
- if (!thread_running())
- run();
+ run();
}
}
}