Removed trailing whitespaces in tilemanager source files (yes I know that code needs...
[supertux.git] / src / addon_manager.cpp
index dcbbdf1..1459983 100644 (file)
@@ -23,6 +23,7 @@
 #include <list>
 #include <physfs.h>
 #include <sys/stat.h>
+#include <stdio.h>
 #include "addon_manager.hpp"
 #include "config.h"
 #include "log.hpp"
@@ -191,11 +192,7 @@ AddonManager::get_addons() const
 
 
 void
-AddonManager::install(const Addon&
-               #ifdef HAVE_LIBCURL
-               addon
-               #endif
-               )
+AddonManager::install(const Addon& addon)
 {
 
 #ifdef HAVE_LIBCURL
@@ -225,6 +222,8 @@ AddonManager::install(const Addon&
   std::string fullFilename = writeDir + dirSep + addon.fname;
   log_debug << "Finished downloading \"" << fullFilename << "\"" << std::endl;
   PHYSFS_addToSearchPath(fullFilename.c_str(), 1);
+#else
+  (void) addon;
 #endif
 
 }
@@ -233,5 +232,5 @@ void
 AddonManager::remove(const Addon& addon)
 {
   PHYSFS_removeFromSearchPath(addon.fname.c_str());
-  unlink(addon.fname.c_str());
+  PHYSFS_delete(addon.fname.c_str());
 }