From: Hallvard Furuseth Date: Tue, 9 Mar 1999 05:53:21 +0000 (+0000) Subject: Check for directory separator `\' in program name, by JR Heisey X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~434 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ce9d86a278cf8e57fd8253d5758d339f62cc2683;p=openldap Check for directory separator `\' in program name, by JR Heisey --- diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index 4dde46f967..08db8c5912 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -95,7 +95,8 @@ main( int argc, char **argv ) FILE *fp; int rc, i, use_ldif, authmethod, version, want_bindpw, debug; - if (( prog = strrchr( argv[ 0 ], '/' )) == NULL ) { + if (( prog = strrchr( argv[ 0 ], '/' )) == NULL && + ( prog = strrchr( argv[ 0 ], '\\' )) == NULL ) { // for Windows/DOS prog = argv[ 0 ]; } else { ++prog;