From 03db16d55b87908f2a08f9431162316d02e66233 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Wed, 2 Nov 2011 13:43:00 +0200 Subject: [PATCH] Remove trailing / or \ in path_userdata (probably fixes world deletion on Windows) --- src/porting.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/porting.cpp b/src/porting.cpp index 217f0926e..f349c0ce5 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -129,8 +129,8 @@ void initializePaths() // Use "./bin/../data" path_data = std::string(buf) + DIR_DELIM ".." DIR_DELIM "data"; - // Use "./bin/../" - path_userdata = std::string(buf) + DIR_DELIM ".." DIR_DELIM; + // Use "./bin/.." + path_userdata = std::string(buf) + DIR_DELIM ".."; /* Linux @@ -149,7 +149,7 @@ void initializePaths() path_data = std::string(buf) + "/../data"; // Use "./bin/../" - path_userdata = std::string(buf) + "/../"; + path_userdata = std::string(buf) + "/.."; /* OS X @@ -160,7 +160,7 @@ void initializePaths() dstream<<"WARNING: Relative path not properly supported on OS X and FreeBSD" <