Article View: comp.sys.apple2.gno
Article #280Re: MV bug (?)
From: Gregory Ross Thompson
Date: Tue, 17 Nov 1992 05:18
Date: Tue, 17 Nov 1992 05:18
46 lines
2244 bytes
2244 bytes
vandry@CAM.ORG (Phillip Vandry) writes: > I noticed a problem with the mv portion of cp. Consider this: > > mv /ram5/dir1 /ram5/dir2 > > There are 2 possible interpretations: Move dir1 and its contents into dir2 > and rename dir1 to dir2. Logically, if dir2 exists, the former should be > performed, while if dir2 does not exist, the latter should happen. Okay, I wrote it, so I guess I'll respond to this one... Here are the two situations (eatme, eatme2, and eatme.again are all directories): mv /ram5/eatme /ram5/eatme2 If eatme2 doesn't exist, the directory eatme gets renamed to eatme2 (ie: eatme2 is the exact same directory tree as eatme, but with a different name). mv /ram5/eatme /ram5/eatme.again If eatme.again DOES exist, then the directory tree 'eatme' is moved into the directory 'eatme.again', not given the name 'eatme.again'. > The problem is that, rather than doing the second option if dir2 does not > exist, mv tries to move dir1 into dir2 anyway. An error happens. What actually happens, is that a ChangePathGS is called. That should work fine... Does for me... Well, in my copy, it works perfectly. Jawaid: have you modified the source code and recompiled for the GNO distribution? If so, could you mail me the latest set of sources so I can see if this is a bug that was introduced after I gave you the source? > I would fix it myself, I figured out how, but I have no C compiler! Don't bother. If it really is a bug (which it isn't in mine), I'll fix it as soon as I get the latest code from Jawaid. -Greg InterNet: gregt+@cmu.edu or: gt0t+@andrew.cmu.edu BITNet : R746GT0T@CMCCVB AOL : GRThompson
Technical Details
Message-ID:
<sf282_m00WB=R9RUNL@andrew.cmu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!gt0t+References:
<Bxq4K3.H3F@CAM.ORG>Show Full Headers
Complete Article Headers
Organization: Senior, Electrical and Computer Engineering, Carnegie Mellon, Pittsburgh, PA Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!gt0t+ Newsgroups: comp.sys.apple2.gno Message-ID: <sf282_m00WB=R9RUNL@andrew.cmu.edu> Date: Tue, 17 Nov 1992 00:18:02 -0500 From: Gregory Ross Thompson <gregt+@CMU.EDU> Subject: Re: MV bug (?) In-Reply-To: <Bxq4K3.H3F@CAM.ORG> References: <Bxq4K3.H3F@CAM.ORG> Lines: 46