[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r3234 - in trunk/pingus: . src
From: |
jsalmon3 |
Subject: |
[Pingus-CVS] r3234 - in trunk/pingus: . src |
Date: |
Sat, 22 Sep 2007 18:44:29 +0200 |
Author: jsalmon3
Date: 2007-09-22 18:44:23 +0200 (Sat, 22 Sep 2007)
New Revision: 3234
Modified:
trunk/pingus/pingus.vcproj
trunk/pingus/src/system.cpp
Log:
Fixed drive letter on windows
Modified: trunk/pingus/pingus.vcproj
===================================================================
--- trunk/pingus/pingus.vcproj 2007-09-22 16:12:51 UTC (rev 3233)
+++ trunk/pingus/pingus.vcproj 2007-09-22 16:44:23 UTC (rev 3234)
@@ -117,7 +117,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="src;src\win32;include"
-
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE=1"
+
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE=1;OFFICIAL_PINGUS_BUILD"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
@@ -655,6 +655,10 @@
>
</File>
<File
+ RelativePath=".\src\pingus_options.hpp"
+ >
+ </File>
+ <File
RelativePath=".\src\pingus_sub_menu.cpp"
>
</File>
Modified: trunk/pingus/src/system.cpp
===================================================================
--- trunk/pingus/src/system.cpp 2007-09-22 16:12:51 UTC (rev 3233)
+++ trunk/pingus/src/system.cpp 2007-09-22 16:44:23 UTC (rev 3234)
@@ -533,15 +533,19 @@
System::realpath(const std::string& pathname)
{
std::string fullpath;
+ std::string drive;
- if (pathname.size() > 0 && pathname[0] == '/'
+ if (pathname.size() > 0 && pathname[0] == '/')
+ {
+ fullpath = pathname;
+ }
#ifdef WIN32
- || (pathname.size() > 2 && pathname[1] == ':' && pathname[2] == '/')
-#endif
- )
+ else if (pathname.size() > 2 && pathname[1] == ':' && pathname[2] == '/')
{
+ drive = pathname.substr(0, 2);
fullpath = pathname;
}
+#endif
else
{
char buf[PATH_MAX];
@@ -556,9 +560,10 @@
if (*p == '\\')
*p = '/';
}
+ drive.assign(buf, 2);
#endif
- fullpath = fullpath + buf + "/" + pathname;
+ fullpath = fullpath + buf + "/" + pathname;
}
std::string result;
@@ -594,7 +599,7 @@
}
}
- return "/" + std::string(result.rbegin(), result.rend());
+ return drive + "/" + std::string(result.rbegin(), result.rend());
}
/* EOF */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r3234 - in trunk/pingus: . src,
jsalmon3 <=