From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 9 Nov 1995 15:02:02 -0500 From: forsyth@plan9.cs.york.ac.uk forsyth@plan9.cs.york.ac.uk Subject: ftpfs change to compensate for some servers Topicbox-Message-UUID: 339c4768-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19951109200202.AqgDtGdRwHCVzlxA9gSeonrf_g0q79jJVYfgY3CG-GI@z> some FTP servers include . and .. in the list, which messes up common commands applied to a mounted ftpfs directory. the following change prevents them from being seen: vortex% diff $home/cd/cmd/ftpfs /sys/src/cmd/ftpfs/proto.c 38a39 > static int isdotdot(char*); 670a672,673 > if(isdotdot(field[7])) > return 0; 681a685,686 > if(isdotdot(field[8])) > return 0; 692a698,699 > if(isdotdot(field[9])) > return 0; 703a711,712 > if(isdotdot(field[0])) > return 0; 721a731,736 > } > > static int > isdotdot(char *n) > { > return n[0]=='.' && (n[1]=='\0' || n[1]=='.' && n[2]=='\0');