Handle relative dirs in -C correctly.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2235 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+11
-10
@@ -162,17 +162,18 @@ prepareConfigDir (const char *configDirName) {
|
|||||||
|
|
||||||
if (configDirName == NULL)
|
if (configDirName == NULL)
|
||||||
configDirName = CONFIGDIR;
|
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
|
#ifdef DEBUG
|
||||||
fprintf (stderr, "Using config dir '%s'\n", configDirName);
|
fprintf (stderr, "Using config dir '%s'\n", configDirName);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -117,6 +117,9 @@ uio_closeRepository(uio_Repository *repository) {
|
|||||||
* inPath - the location relative to the root of the newly
|
* inPath - the location relative to the root of the newly
|
||||||
* mounted fileSystem, pointing to the directory
|
* mounted fileSystem, pointing to the directory
|
||||||
* that is to be grafted.
|
* 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
|
* autoMount - array of automount options in function
|
||||||
* in this mountPoint.
|
* in this mountPoint.
|
||||||
* flags - one of uio_MOUNT_TOP, uio_MOUNT_BOTTOM,
|
* flags - one of uio_MOUNT_TOP, uio_MOUNT_BOTTOM,
|
||||||
|
|||||||
Reference in New Issue
Block a user