Browse Source

if PANDA_ROOT not specified, default is \\

David Rose 23 years ago
parent
commit
14a6ea47be
1 changed files with 2 additions and 4 deletions
  1. 2 4
      dtool/src/dtoolutil/filename.cxx

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

@@ -99,7 +99,7 @@ get_panda_root() {
       panda_root = front_to_back_slash(envvar);
     }
 
-    if (!panda_root.empty() && panda_root[panda_root.length() - 1] != '\\') {
+    if (panda_root.empty() || panda_root[panda_root.length() - 1] != '\\') {
       panda_root += '\\';
     }
 
@@ -161,9 +161,7 @@ convert_pathname(const string &unix_style_pathname) {
 #else  // HAVE_CYGWIN
     // Without Cygwin, just prefix $PANDA_ROOT.
     windows_pathname = get_panda_root();
-    if (unix_style_pathname != "/") {
-      windows_pathname += front_to_back_slash(unix_style_pathname.substr(1));
-    }
+    windows_pathname += front_to_back_slash(unix_style_pathname.substr(1));
 #endif  // HAVE_CYGWIN
   }