fixed bug reported by tove (1 -> 11, label kept state)

This commit is contained in:
Anselm R. Garbe 2006-04-11 17:38:58 +02:00
parent 0fff5a5aaf
commit 7c6025aee3
2 changed files with 3 additions and 2 deletions

View File

@ -395,7 +395,7 @@ mkqid(Qid *dir, char *wname, Qid *new)
return -1;
if((dir_type == FsDclient) && ((dir_i1 == -1 || dir_i2 == -1 || dir_i3 == -1)))
return -1;
else if(dir_i1 == -1)
else if(((dir_type == FsDview) || (dir_type == FsDGclient)) && (dir_i1 == -1))
return -1;
goto Mkfile;
break;

View File

@ -144,7 +144,8 @@ name2view(char *name)
unsigned int i;
for(i = 0; i < view.size; i++)
if(!strncmp(view.data[i]->name, name, strlen(name)))
if(!strncmp(view.data[i]->name, name, strlen(name))
&& !strncmp(view.data[i]->name, name, strlen(view.data[i]->name)))
return view.data[i];
return nil;
}