]> git.sur5r.net Git - openldap/commitdiff
Check for directory separator `\' in program name, by JR Heisey
authorHallvard Furuseth <hallvard@openldap.org>
Tue, 9 Mar 1999 05:53:21 +0000 (05:53 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Tue, 9 Mar 1999 05:53:21 +0000 (05:53 +0000)
clients/tools/ldapmodify.c

index 4dde46f967a66bfe97d4606530dfbba2a2d32b7b..08db8c591286f03867809ebfa888a59797a79344 100644 (file)
@@ -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;