ide, PathBox; fixed when selecting a directory in global settings, default keeps...
authorRejean Loyer <rejean.loyer@gmail.com>
Thu, 23 May 2013 02:32:24 +0000 (22:32 -0400)
committerRejean Loyer <rejean.loyer@gmail.com>
Mon, 27 May 2013 17:15:22 +0000 (13:15 -0400)
ecere/src/gui/controls/PathBox.ec

index 05b7f14..d55bedc 100644 (file)
@@ -195,14 +195,11 @@ public class PathBox : CommonControl
             DataBox dataBox = pathBoxDataBox;
             ListBox listBox;
             DirectoriesBox dirsBox;
-            browsePath[0] = fileName [0] = '\0';
+            browsePath[0] = fileName[0] = '\0';
+            strncpy(browsePath, browseDialog.filePath, MAX_LOCATION); browsePath[MAX_LOCATION-1] = '\0';
             if((dirsBox = pathBoxDirsBox) && dirsBox.baseBrowsePath && dirsBox.baseBrowsePath[0])
-            {
-               strncpy(browsePath, dirsBox.baseBrowsePath, MAX_LOCATION); browsePath[MAX_LOCATION-1] = '\0';
-               PathCat(browsePath, editBox.contents);
-            }
-            else
-               strncpy(browsePath, editBox.contents, MAX_LOCATION); browsePath[MAX_LOCATION-1] = '\0';
+               PathCat(browsePath, dirsBox.baseBrowsePath);
+            PathCat(browsePath, editBox.contents);
             if(browsePath[0])
             {
                GetLastDirectory(browsePath, fileName);