From 8e0cd93604a44774f0025365f7ef438421dc5631 Mon Sep 17 00:00:00 2001 From: meep-eep Date: Fri, 27 Jan 2006 00:13:20 +0000 Subject: [PATCH] Handle relative dirs in -C correctly. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2235 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/options.c | 21 +++++++++++---------- sc2/src/sc2code/libs/uio/io.c | 3 +++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/sc2/src/options.c b/sc2/src/options.c index 5bb04decd..907f03659 100644 --- a/sc2/src/options.c +++ b/sc2/src/options.c @@ -162,17 +162,18 @@ prepareConfigDir (const char *configDirName) { if (configDirName == NULL) configDirName = CONFIGDIR; - - if (expandPath (buf, PATH_MAX - 13, configDirName, EP_ALL_SYSTEM) - == -1) - { - // Doesn't have to be fatal, but might mess up things when saving - // config files. - fprintf (stderr, "Fatal error: Invalid path to config files.\n"); - exit (EXIT_FAILURE); - } - configDirName = buf; } + + if (expandPath (buf, PATH_MAX - 13, configDirName, EP_ALL_SYSTEM) + == -1) + { + // Doesn't have to be fatal, but might mess up things when saving + // config files. + fprintf (stderr, "Fatal error: Invalid path to config files.\n"); + exit (EXIT_FAILURE); + } + configDirName = buf; + #ifdef DEBUG fprintf (stderr, "Using config dir '%s'\n", configDirName); #endif diff --git a/sc2/src/sc2code/libs/uio/io.c b/sc2/src/sc2code/libs/uio/io.c index 7a54c1b3d..70e6f029a 100644 --- a/sc2/src/sc2code/libs/uio/io.c +++ b/sc2/src/sc2code/libs/uio/io.c @@ -117,6 +117,9 @@ uio_closeRepository(uio_Repository *repository) { * inPath - the location relative to the root of the newly * mounted fileSystem, pointing to the directory * that is to be grafted. + * Note: If fsType is uio_FSTYPE_STDIO, inPath is + * relative to the root of the filesystem, NOT to + * the current working dir. * autoMount - array of automount options in function * in this mountPoint. * flags - one of uio_MOUNT_TOP, uio_MOUNT_BOTTOM,