Skip to content

Commit

Permalink
port most of r38990 from trunk
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/branches/R-2-3-patches@38992 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Aug 27, 2006
1 parent fa40659 commit 48b83f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 5 additions & 1 deletion src/gnuwin32/CHANGES
Expand Up @@ -28,6 +28,10 @@ and Administration Manual'. (Thanks to David del Campo (Dept of
Statistics, University of Oxford) for suggesting WiX and building a
prototype installer.)

It was intended that saving the GUI preferences would default to the
home directory, but Windows only accepted paths with \ separators at
that point, ignoring others with no error message.



R 2.3.1
Expand All @@ -49,7 +53,7 @@ a message about 'outer margins too large'. (PR#8857)

Sys.setlocale() interprets LC_CTYPE=C as a request for CP1252, as the
startup code long has. (This is necessary to avoid various crashes
in the runtime code.)
in the MinGW runtime code.)



Expand Down
12 changes: 7 additions & 5 deletions src/gnuwin32/graphapp/dialogs.c
Expand Up @@ -244,7 +244,7 @@ char *askfilesavewithdir(char *title, char *default_name, char *dir)
{
int i;
OPENFILENAME ofn;
char cwd[MAX_PATH];
char *p, cwd[MAX_PATH];

if (! default_name)
default_name = "";
Expand All @@ -262,10 +262,12 @@ char *askfilesavewithdir(char *title, char *default_name, char *dir)
ofn.nMaxFile = BUFSIZE;
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = _MAX_FNAME + _MAX_EXT;
if(dir && strlen(dir) > 0)
ofn.lpstrInitialDir = dir;
else {
if (GetCurrentDirectory(MAX_PATH,cwd))
if(dir && strlen(dir) > 0) {
strcpy(cwd, dir);
for(p = cwd; *p; p++) if(*p == '/') *p = '\\';
ofn.lpstrInitialDir = cwd;
} else {
if (GetCurrentDirectory(MAX_PATH, cwd))
ofn.lpstrInitialDir = cwd;
else
ofn.lpstrInitialDir = NULL;
Expand Down

0 comments on commit 48b83f1

Please sign in to comment.