From bf873e8e28f7ac4998614b1e94b677a11df89e6a Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 30 Dec 2002 19:01:44 +0000 Subject: [PATCH] Set the default directory to somewhere useful (the PuTTY saved sessions folder) when we start up. git-svn-id: svn://svn.tartarus.org/sgt/putty@2388 cda61777-01e9-0310-a592-d414129be87e --- mac/mac.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mac/mac.c b/mac/mac.c index 0abb3375..deb083af 100644 --- a/mac/mac.c +++ b/mac/mac.c @@ -1,4 +1,4 @@ -/* $Id: mac.c,v 1.10 2002/12/30 18:21:17 ben Exp $ */ +/* $Id: mac.c,v 1.11 2002/12/30 19:01:44 ben Exp $ */ /* * Copyright (c) 1999 Ben Harris * All rights reserved. @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -174,6 +175,17 @@ static void mac_startup(void) { windows.about = NULL; windows.licence = NULL; + { + short vol; + long dirid; + + /* Set the default directory for loading and saving settings. */ + /* XXX Should we create it? */ + if (get_session_dir(FALSE, &vol, &dirid) == noErr) { + LMSetSFSaveDisk(-vol); + LMSetCurDirStore(dirid); + } + } init_ucs(); } -- 2.11.0