acme: add -m option and avoid looking in the mirror

This commit is contained in:
Russ Cox 2008-04-17 16:04:19 -04:00
parent e63025d094
commit cd5a73785d
6 changed files with 25 additions and 2 deletions

View file

@ -200,6 +200,10 @@ textload(Text *t, uint q0, char *file, int setqid)
warning(nil, "empty directory name");
return 0;
}
if(ismtpt(file)){
warning(nil, "will not open self mount point %s\n", file);
return 0;
}
fd = open(file, OREAD);
if(fd < 0){
warning(nil, "can't open %s: %r\n", file);