nsmd: Permit trailing slash in session root.

This commit is contained in:
Jonathan Moore Liles 2013-02-07 20:45:19 -08:00
parent 5fc5ce0cc0
commit 0c5a46422a
1 changed files with 7 additions and 0 deletions

View File

@ -2101,8 +2101,15 @@ int main(int argc, char *argv[])
detach = true; detach = true;
break; break;
case 's': case 's':
{
session_root = optarg; session_root = optarg;
/* get rid of trailing slash */
char *s = rindex(session_root,'/');
if ( s == &session_root[strlen(session_root) - 1] )
*s = '\0';
break; break;
}
case 'p': case 'p':
DMESSAGE( "Using OSC port %s", optarg ); DMESSAGE( "Using OSC port %s", optarg );
osc_port = optarg; osc_port = optarg;