mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 15:53:55 -04:00
fixed login bug for multiple lines in .cvspass
This commit is contained in:
parent
efd39d4072
commit
55e37a3e15
@ -56,19 +56,26 @@ sub CTCvsLogin {
|
|||||||
}
|
}
|
||||||
&CTUDebug( "looking for '" . $path . "'\n" ) ;
|
&CTUDebug( "looking for '" . $path . "'\n" ) ;
|
||||||
if ( -e $path ) {
|
if ( -e $path ) {
|
||||||
|
local( $passdone ) = 0 ;
|
||||||
|
local( $ok ) = 0 ;
|
||||||
open( PASSFILE, "< $path" ) ;
|
open( PASSFILE, "< $path" ) ;
|
||||||
$_ = <PASSFILE> ;
|
while ( <PASSFILE> ) {
|
||||||
s/\n$// ;
|
s/\n$// ;
|
||||||
local( @line ) = split ;
|
local( @line ) = split ;
|
||||||
# ok, the server line is in [0] and the password in [1].
|
# ok, the server line is in [0] and the password in [1].
|
||||||
&CTUDebug( "server line from .cvspass is '" . $line[0] . "'\n" ) ;
|
&CTUDebug( "server line from .cvspass is '" . $line[0] .
|
||||||
if ( $line[0] ne $_[0] ) {
|
"'\n" ) ;
|
||||||
|
if ( $line[0] eq $_[0] ) {
|
||||||
|
# we're fine, we're already logged in to that
|
||||||
|
$ret = 1 ;
|
||||||
|
$passdone = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( ! $passdone ) {
|
||||||
|
# ran out of lines in the file
|
||||||
local( $line ) = "cvs -d " . $_[0] . " login >/dev/null" ;
|
local( $line ) = "cvs -d " . $_[0] . " login >/dev/null" ;
|
||||||
&CTUDebug( "about to run '" . $line . "'\n" ) ;
|
&CTUDebug( "about to run '" . $line . "'\n" ) ;
|
||||||
$ret = &CTURetCode( system( $line )) ;
|
$ret = &CTURetCode( system( $line )) ;
|
||||||
} else {
|
|
||||||
# we're fine, we're already logged in to that
|
|
||||||
$ret = 1 ;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
&CTUDebug( $path . " file does not exist\n" ) ;
|
&CTUDebug( $path . " file does not exist\n" ) ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user