Commit 490aec5a authored by bonnell's avatar bonnell
Browse files

Removed assumption that Drive letter on Windows is 'C' in GetDefaultConfigFile.

Fixed problem with Open File dialog on Windows, not being able to go 'up' past the C: drive to 'My Computer' where all drives are listed.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@16609 18c085ea-50e0-402c-830e-de6fd14e8384
parent 285accc6
...@@ -99,6 +99,9 @@ static bool isDevelopmentVersion = false; ...@@ -99,6 +99,9 @@ static bool isDevelopmentVersion = false;
// Kathleen Bonnell, Thu Apr 22 17:25:54 MST 2010 // Kathleen Bonnell, Thu Apr 22 17:25:54 MST 2010
// Username no longer added to config file names on windows. // Username no longer added to config file names on windows.
// //
// Kathleen Biagas, Wed Nov 2 09:55:12 MST 2010
// Don't assume drive letter is 'C', only test for presence of ':'.
//
// **************************************************************************** // ****************************************************************************
char * char *
...@@ -117,7 +120,7 @@ GetDefaultConfigFile(const char *filename, const char *home) ...@@ -117,7 +120,7 @@ GetDefaultConfigFile(const char *filename, const char *home)
return retval; return retval;
} }
// If the filename has an absolute path, do not prepend the home directory. // If the filename has an absolute path, do not prepend the home directory.
if (filename != NULL && (filename[0] == 'C' && filename[1] == ':')) if (filename != NULL && strlen(filename) > 1 && filename[1] == ':')
{ {
retval = new char[strlen(filename)+1]; retval = new char[strlen(filename)+1];
strcpy(retval, filename); strcpy(retval, filename);
......
...@@ -1182,6 +1182,10 @@ MDServerConnection::ExpandPath(const std::string &path) ...@@ -1182,6 +1182,10 @@ MDServerConnection::ExpandPath(const std::string &path)
// //
// Brad Whitlock, Thu Feb 24 23:31:32 PST 2011 // Brad Whitlock, Thu Feb 24 23:31:32 PST 2011
// Make sure that the path is at least 1 character long // Make sure that the path is at least 1 character long
//
// Kathleen Biagas, Wed Nov 2 17:16:43 MST 2011
// Don't do anything if path is 'My Computer' as this is a special folder.
//
// **************************************************************************** // ****************************************************************************
std::string std::string
...@@ -1205,6 +1209,11 @@ MDServerConnection::ExpandPathHelper(const std::string &path, ...@@ -1205,6 +1209,11 @@ MDServerConnection::ExpandPathHelper(const std::string &path,
// absolute path. do nothing // absolute path. do nothing
newPath = path; newPath = path;
} }
else if(path == "My Computer")
{
// special path. do nothing
newPath = path;
}
else else
{ {
// relative path: // relative path:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment