Skip to content

Commit

Permalink
Fix for checkin 262. Correctly honour passed in username and password
Browse files Browse the repository at this point in the history
git-svn-id: http://opensource.utr-software.com/source/connection/trunk@276 30aebe3c-6c0d-0410-bd16-8e6c7f3d8b55
  • Loading branch information
ghulands committed Sep 23, 2006
1 parent 7c3d001 commit 760a748
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions DotMacConnection.m
Expand Up @@ -128,7 +128,14 @@ - (id)initWithHost:(NSString *)host
NSString *username = nil;
NSString *password = nil;

if (user == nil || [user isEqualToString:@""])
if (user && password)
{
if (self = [super initWithHost:@"idisk.mac.com" port:@"80" username:user password:pass error:error])
{
myCurrentDirectory = [[NSString stringWithFormat:@"/%@/", user] retain];
}
}
else
{
if (![self getDotMacAccountName:&username password:&password])
{
Expand All @@ -149,13 +156,6 @@ - (id)initWithHost:(NSString *)host
myCurrentDirectory = [[NSString stringWithFormat:@"/%@/", username] retain];
}
}
else
{
if (self = [super initWithHost:@"idisk.mac.com" port:@"80" username:user password:pass error:error])
{
myCurrentDirectory = [[NSString stringWithFormat:@"/%@/", user] retain];
}
}

return self;
}
Expand Down

0 comments on commit 760a748

Please sign in to comment.