#include <list>
#include <physfs.h>
#include <sys/stat.h>
+#include <stdio.h>
#include "addon_manager.hpp"
#include "config.h"
#include "log.hpp"
void
-AddonManager::install(const Addon&
- #ifdef HAVE_LIBCURL
- addon
- #endif
- )
+AddonManager::install(const Addon& addon)
{
#ifdef HAVE_LIBCURL
std::string fullFilename = writeDir + dirSep + addon.fname;
log_debug << "Finished downloading \"" << fullFilename << "\"" << std::endl;
PHYSFS_addToSearchPath(fullFilename.c_str(), 1);
+#else
+ (void) addon;
#endif
}
AddonManager::remove(const Addon& addon)
{
PHYSFS_removeFromSearchPath(addon.fname.c_str());
- unlink(addon.fname.c_str());
+ PHYSFS_delete(addon.fname.c_str());
}