From b211592822d80c760e34bb21b8154a005d83f7e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sun, 26 Apr 2015 20:27:39 +0200 Subject: [PATCH] zipomatic: notify an error when /bin/zip is missing Since zip has been outsourced, it's possible to loose it when upgrading, in which case ZOM went busylooping without noticing the thread actually never started. At least now it says "failed to create the archive". Maybe it should try to install zip? --- src/add-ons/tracker/zipomatic/ZipperThread.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/add-ons/tracker/zipomatic/ZipperThread.cpp b/src/add-ons/tracker/zipomatic/ZipperThread.cpp index fa9502d0d2..2a6c690ffd 100644 --- a/src/add-ons/tracker/zipomatic/ZipperThread.cpp +++ b/src/add-ons/tracker/zipomatic/ZipperThread.cpp @@ -220,6 +220,10 @@ ZipperThread::ThreadShutdown() void ZipperThread::ThreadStartupFailed(status_t status) { + fprintf(stderr, "ZipperThread::ThreadStartupFailed(): %s\n", + strerror(status)); + _SendMessageToWindow(ZIPPO_THREAD_EXIT_ERROR); + Quit(); } @@ -228,9 +232,12 @@ void ZipperThread::ExecuteUnitFailed(status_t status) { if (status == EOF) { + fprintf(stderr, "ZipperThread::ExecuteUnitFailed(): EOF\n"); // thread has finished, been quit or killed, we don't know _SendMessageToWindow(ZIPPO_THREAD_EXIT); } else { + fprintf(stderr, "ZipperThread::ExecuteUnitFailed(): %s\n", + strerror(status)); // explicit error - communicate error to Window _SendMessageToWindow(ZIPPO_THREAD_EXIT_ERROR); }