9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: forsyth@plan9.cs.york.ac.uk forsyth@plan9.cs.york.ac.uk
Subject: ftpfs change to compensate for some servers
Date: Thu,  9 Nov 1995 15:02:02 -0500	[thread overview]
Message-ID: <19951109200202.AqgDtGdRwHCVzlxA9gSeonrf_g0q79jJVYfgY3CG-GI@z> (raw)


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');






             reply	other threads:[~1995-11-09 20:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-11-09 20:02 forsyth [this message]
1995-11-10  8:58 presotto
1995-11-10 16:16 forsyth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19951109200202.AqgDtGdRwHCVzlxA9gSeonrf_g0q79jJVYfgY3CG-GI@z \
    --to=forsyth@plan9.cs.york.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).