Support absolute directory names in -x argument and in yate.conf extrapath.
git-svn-id: http://yate.null.ro/svn/yate/trunk@6088 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
2966769c33
commit
3ec80e12bb
|
@ -11,8 +11,8 @@
|
||||||
; Note that you MUST NOT add a path separator at the end
|
; Note that you MUST NOT add a path separator at the end
|
||||||
;modpath=
|
;modpath=
|
||||||
|
|
||||||
; extrapath: string: Relative path to an extra modules directory, gets loaded
|
; extrapath: string: Absolute or relative path to an extra modules directory,
|
||||||
; before those added by command line -x parameters
|
; gets loaded before those added by command line -x parameters
|
||||||
; Note that you MUST NOT add a path separator at the end
|
; Note that you MUST NOT add a path separator at the end
|
||||||
;extrapath=
|
;extrapath=
|
||||||
|
|
||||||
|
|
|
@ -68,8 +68,8 @@ Path to modules directory, overrides compiled-in value
|
||||||
.B \-e \fIpathname\fR
|
.B \-e \fIpathname\fR
|
||||||
Path to shared directory, overrides compiled-in value
|
Path to shared directory, overrides compiled-in value
|
||||||
.TP
|
.TP
|
||||||
.B \-x \fIrelpath\fR
|
.B \-x \fIdirpath\fR
|
||||||
Relative path to extra modules directory (can be repeated)
|
Absolute or relative path to extra modules directory (can be repeated)
|
||||||
.TP
|
.TP
|
||||||
.B \-w \fIdirectory\fR
|
.B \-w \fIdirectory\fR
|
||||||
Change working directory
|
Change working directory
|
||||||
|
|
|
@ -1831,7 +1831,10 @@ bool Engine::loadPluginDir(const String& relPath)
|
||||||
#endif
|
#endif
|
||||||
bool defload = s_cfg.getBoolValue("general","modload",true);
|
bool defload = s_cfg.getBoolValue("general","modload",true);
|
||||||
String path = s_modpath;
|
String path = s_modpath;
|
||||||
if (relPath) {
|
static const Regexp r("^\\([/\\]\\|[[:alpha:]]:[/\\]\\).");
|
||||||
|
if (r.matches(relPath))
|
||||||
|
path = relPath;
|
||||||
|
else if (relPath) {
|
||||||
if (!path.endsWith(PATH_SEP))
|
if (!path.endsWith(PATH_SEP))
|
||||||
path += PATH_SEP;
|
path += PATH_SEP;
|
||||||
path += relPath;
|
path += relPath;
|
||||||
|
@ -2275,7 +2278,7 @@ static void usage(bool client, FILE* f)
|
||||||
" -c pathname Path to conf files directory (" CFG_PATH ")\n"
|
" -c pathname Path to conf files directory (" CFG_PATH ")\n"
|
||||||
" -u pathname Path to user files directory (%s)\n"
|
" -u pathname Path to user files directory (%s)\n"
|
||||||
" -m pathname Path to modules directory (" MOD_PATH ")\n"
|
" -m pathname Path to modules directory (" MOD_PATH ")\n"
|
||||||
" -x relpath Relative path to extra modules directory (can be repeated)\n"
|
" -x dirpath Absolute or relative path to extra modules directory (can be repeated)\n"
|
||||||
" -w directory Change working directory\n"
|
" -w directory Change working directory\n"
|
||||||
" -N nodename Set the name of this node in a cluster\n"
|
" -N nodename Set the name of this node in a cluster\n"
|
||||||
#ifdef RLIMIT_CORE
|
#ifdef RLIMIT_CORE
|
||||||
|
|
Loading…
Reference in New Issue