This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: unlink() problem


> From: John Wiersba [mailto:John.Wiersba@medstat.com]
> Subject: RE: unlink() problem
> Thanks for your reply, Larry.  Unfortunately, this is a bad bug since the
> simple perl script below removes the original file (whoops!) since it
> assumes that if you have permission to unlink the original file, then you
> have permission to create a new file of the same name (I believe this is
> always true on unix).  The net result is that you lose your data.
> 
> I can't think of anyway around it except to know that you can't do inplace
> editing on cygwin.
> 
> -- John Wiersba
 
> > >$ touch asdf
> > >$ perl -i -pe 1 asdf
> > >Can't do inplace edit on asdf: Permission denied.
 But using ActiveState perl,

      D:\home>perl -i -pe 1 asdf
      Can't do inplace edit without backup.
 
 and the file's not clobbered.
 Time to look at the perl source code.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]