[comp.soft-sys.andrew] Ez of symbolically linked files.

bernerus@BIRK.CS.CHALMERS.SE (Christer Bernerus) (06/28/90)

Excerpts from mail: 25-Jun-90 Re: Ez of symbolically link.. Bill
Cattey@athena.mit.edu

> Perhaps there should be new preferences added like:

> ActionOnSymbolicLink:  overwrite, new, query
> BackupByCopying: true, false

> -wdc

Since I started the discussion and  have been following it silently I'd
now like to say that I agree with Bill.
However I'd like to see those preferences too, otherwise it could get
rather irritating if one is doing lots of editing in a shadow tree.

Chris

markf@zurich.ai.mit.edu (06/29/90)

>> From: Adam Stoller <ghoti+@andrew.cmu.edu>
>> To: Info-Andrew <info-andrew+@andrew.cmu.edu>
>> Subject: Re: Ez of symbolically linked files.
>> In-Reply-To: <9006251438.AA01624@zurich.ai.mit.edu>
>> References: <9006251438.AA01624@zurich.ai.mit.edu>
>> 
>> EZ currently offers the feature of being able to warn you about saving
>> [Save As] a file with a name that is already in use and [Save] about
>> possibly overwriting changes which occured underneath your editing
>> session.
>> 
>> It seems to me a similar device (lstat?) could be used to determine if
>> the file which is about to be written is actually a symbolic (or hard??)
>> link and warn you of that as well.
>> 
>> I haven't looked at the code that does the former (nor am I volunteering
>> to do the latter) - but I can't imagine it would be that hard? 
>> (probably the hardest thing is to figure out how to word the question
>> that needs to be answered)
>> 
>> --fish

For my emacs write-file-hook I have a mechanism like the following:

if file <filename> is a symbolic link then
  ask "Symbolic link. Overwrite <linked-to-filename>? "
  if the answer is yes then
    overwrite the file that the link points to.
  else
    ask "Remove symbolic link and create %s? "
      if the answer is yes then
        remove the link and create the file <filename>.
      endif
  endif
endif

Note that two "no" answers allows you to totally back out of the write.
       

Mark Friedman
MIT Artificial Intelligence Lab
545 Technology Sq.
Cambridge, Ma. 02139

markf@zurich.ai.mit.edu
------- End of Unsent Draft

pive@BANRUC01.BITNET (06/29/90)

While one is discussing the problem with symbolic links, I wish to point
some attention to another problem with ez: if I save a file, the acces
modes are set according to the umask (or is mask) value of the csh, even
if the file had another acces mode.




P. Verhaeghe
University of Antwerp, RUCA
Algebra / Geometry
Groenenborgerlaan 171
B-2020 Antwerpen, Belgium

Tel: +32 3 2180308
Fax: +32 3 2180217
Telex: RUCABI 33362

E-mail: pive@banruc01.bitnet (or pive@ccu.uia.ac.be)

bernerus@BIRK.CS.CHALMERS.SE (Christer Bernerus) (10/02/90)

Sometime during the summer I brought up the problem with ez silently
transforming symbolic links into real files. 

A long discussion took place, but apparently, nothing happened. Since 
I've been bitten again I'd like to bring up the subject. 
I've applied patch 6 and 7 but still have problems.

Has there been any development on the subject that I've missed?  Is the
subject dropped or will something be done.

I guess more people are having problems.

Chris.
-------------------------------------------------------
Christer Bernirus 			! E-mail: bernerus@cs.chalmers.se
Chalmers University of Technology		! Phone: +46 31 721000
Department of Computer Science		! Ham radio: SM6FBQ	144.3 MHz
S-412 96 Gvteborg, SWEDEN