فهرست منبع

Use non-wide strings for paths when not on Windows

Marc Legendre 9 سال پیش
والد
کامیت
e4a4ebe6cd
2فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 2 2
      Source/BansheeCore/Source/BsIconUtility.cpp
  2. 2 2
      Source/BansheeUtility/Source/BsFileSerializer.cpp

+ 2 - 2
Source/BansheeCore/Source/BsIconUtility.cpp

@@ -201,7 +201,7 @@ namespace BansheeEngine
 		//    - icon/cursor/etc data
 
 		std::fstream stream;
-		stream.open(path.toWString().c_str(), std::ios::in | std::ios::out | std::ios::binary);
+		stream.open(path.toPlatformString().c_str(), std::ios::in | std::ios::out | std::ios::binary);
 
 		// First check magic number to ensure file is even an executable
 		UINT16 magicNum;
@@ -379,4 +379,4 @@ namespace BansheeEngine
 			}
 		}
 	}
-}
+}

+ 2 - 2
Source/BansheeUtility/Source/BsFileSerializer.cpp

@@ -23,7 +23,7 @@ namespace BansheeEngine
 		if (!FileSystem::exists(parentDir))
 			FileSystem::createDir(parentDir);
 
-		mOutputStream.open(fileLocation.toWString().c_str(), std::ios::out | std::ios::binary);
+		mOutputStream.open(fileLocation.toPlatformString().c_str(), std::ios::out | std::ios::binary);
 		if (mOutputStream.fail())
 		{
 			LOGWRN("Failed to save file: \"" + fileLocation.toString() + "\". Error: " + strerror(errno) + ".");
@@ -100,4 +100,4 @@ namespace BansheeEngine
 		mInputStream->read(&objectSize, sizeof(objectSize));
 		mInputStream->skip(objectSize);
 	}
-}
+}