bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cvs co -d <repository> prevention


From: Derek R. Price
Subject: Re: cvs co -d <repository> prevention
Date: Fri, 25 May 2001 13:14:22 -0400

Donald Sharp wrote:

> So I think that the correct time to check for safe_location is
> after the directory tree has been built and chdir'ed into.

That makes some sense, since otherwise the code that figures out which 
directory to
checkout into may be run twice...  it leaves a directory to cleanup in the 
failure
case though.

What about trying the parent dir too (as determined using the last_component
function) if errno after the chdir is ENOEXIST or whatever...

If both chdirs fail, then safe_location can too since we know that CVS will only
build one level if directories due to a -d switch.

I was about to code this, but if you have it in hand, I'll let you...

Derek

--
Derek Price                      CVS Solutions Architect ( http://CVSHome.org )
mailto:dprice@collab.net         CollabNet ( http://collab.net )
--
I will not fake my way through life.
I will not fake my way through life.
I will not fake my way through life...

          - Bart Simpson on chalkboard, _The Simpsons_






reply via email to

[Prev in Thread] Current Thread [Next in Thread]