From 268ec8d1e0a01459eb7f04e0652f26bb7b597ba6 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 24 Feb 2014 13:23:03 -0800 Subject: [PATCH] Fix for GitHub issue #40: updates.d not being cleared. --- make-linux.mk | 1 + node/SoftwareUpdater.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/make-linux.mk b/make-linux.mk index 385ea7507..871d0ea27 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -8,6 +8,7 @@ LIBS= ifeq ($(ZT_OFFICIAL_RELEASE),1) ZT_AUTO_UPDATE=1 + DEFS+=-DZT_OFFICIAL_RELEASE endif ifeq ($(ZT_AUTO_UPDATE),1) DEFS+=-DZT_AUTO_UPDATE diff --git a/node/SoftwareUpdater.cpp b/node/SoftwareUpdater.cpp index 397149cfb..cb54185f6 100644 --- a/node/SoftwareUpdater.cpp +++ b/node/SoftwareUpdater.cpp @@ -81,7 +81,7 @@ void SoftwareUpdater::cleanOldUpdates() std::map dl(Utils::listDirectory(updatesDir.c_str())); for(std::map::iterator i(dl.begin());i!=dl.end();++i) { if (!i->second) - Utils::rm(i->first.c_str()); + Utils::rm((updatesDir + ZT_PATH_SEPARATOR_S + i->first).c_str()); } }