Quellcode durchsuchen

maybe fix / problem on NT

David Rose vor 23 Jahren
Ursprung
Commit
2d3f7d0a5a
1 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 4 2
      dtool/src/dtoolutil/filename.cxx

+ 4 - 2
dtool/src/dtoolutil/filename.cxx

@@ -160,8 +160,10 @@ convert_pathname(const string &unix_style_pathname) {
     windows_pathname = result;
 #else  // HAVE_CYGWIN
     // Without Cygwin, just prefix $PANDA_ROOT.
-    windows_pathname =
-      get_panda_root() + front_to_back_slash(unix_style_pathname.substr(1));
+    windows_pathname = get_panda_root();
+    if (unix_style_pathname != "/") {
+      windows_pathname += front_to_back_slash(unix_style_pathname.substr(1));
+    }
 #endif  // HAVE_CYGWIN
   }