Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
Rugxulo

Homepage

Usono,
22.09.2007, 04:51
 

FreeDOS XCOPY (rxcopy 1.3) dir attrib bug + patch (Users)

Hey guys,
I dunno if any of you change your DIR attribs a lot (like me), but
there's a very tiny bug in the current FreeDOS XCOPY tool (from "BASE"). See
below for an example plus my fix:

=== *** XCOPYDIR.BUG *** ===

[ DR-DOS ] Fri  9-21-2007>vv c:\home\check3d
C:\HOME\CHECK3D\*.*

DADOS              (DIR)              Apr,16,2006   06:41:16pm   ...R
check3d  exe       55,136             Dec,16,1995   11:13:10am   A...

[ DR-DOS ] Fri  9-21-2007>vv bin
D:\RAMD\BIN\*.*

oldxcopy exe       15,547             Sep,11,2005   10:22:26pm   A...
xcopy    exe       15,702             Sep,21,2007   02:16:16am   A...

[ DR-DOS ] Fri  9-21-2007>bin\oldxcopy c:\home\check3d 1 /i /s
Copying C:\HOME\CHECK3D\CHECK3D.EXE
1 file(s) copied

[ DR-DOS ] Fri  9-21-2007>bin\xcopy c:\home\check3d 2 /i /s
Copying C:\HOME\CHECK3D\DADOS\DEFAULT.S
Copying C:\HOME\CHECK3D\DADOS\DEFAULT.PAR
Copying C:\HOME\CHECK3D\DADOS\INFOI.PCX
Copying C:\HOME\CHECK3D\DADOS\INIC.PCX
Copying C:\HOME\CHECK3D\DADOS\OBSINI.PCX
Copying C:\HOME\CHECK3D\DADOS\DEFMET.PCX
Copying C:\HOME\CHECK3D\CHECK3D.EXE
7 file(s) copied

[ DR-DOS ] Fri  9-21-2007>scrndump

---------------------------------------------------------------------------
diff -Nar \ramd\xcopy\source\rxcopy/makefile \ramd\source\rxcopy/makefile
10c10
< UPX=upx --8086
---
> UPX=upx --ultra-brute --lzma --8086
23c23
< CFLAGS=-w -M -f- -Z -a- -O -k- -K -ln -e
---
> CFLAGS=-w -a- -O -k- -K -ln -e
diff -Nar \ramd\xcopy\source\rxcopy/xcopy.c \ramd\source\rxcopy/xcopy.c
624c624
<       if (fileblock.ff_attrib == FA_DIREC &&
---
> if ((fileblock.ff_attrib & FA_DIREC) &&
871c871
< }
\ No newline at end of file
---
> }

---------------------------------------------------------------------------

Hope this helps! :-)

---
Know your limits.h

Rugxulo

Homepage

Usono,
23.09.2007, 01:41

@ Rugxulo
 

FreeDOS XCOPY (rxcopy 1.3) dir attrib bug + patch

Or just grab the updated binary w/ src here: rxcopy14.zip (52k)

---
Know your limits.h

Rugxulo

Homepage

Usono,
28.09.2007, 13:00

@ Rugxulo
 

FreeDOS XCOPY (rxcopy 1.4) released

> Or just grab the updated binary w/ src here:
> rxcopy14.zip
> (52k)

BTW, Vista comes with both XCOPY (now "deprecated", 59 lines of help screen) and ROBOCOPY ("robust copy", 145-lines in /?). And there are various free (but closed src) DOS versions listed on Steve's Short.Stop page (ZCOPY uses XMS, XCLONE has LFN) plus XXCOPY (SFN only but 1325 lines of /HELP, more than any utility I've ever seen!).

To be honest, there's even a small, FOSS assembly one w/ LFN support in the works (not by me, though). Good news if you need that sort of thing!

Someone asked on one of the FD mailing lists about an LFN version of XCOPY, and Blair (who lacks frequent Net access) supposedly had updated the FD one, too. (I really need to ask him about it, but it's not crucial. I think modifying the Kitten support would only be necessary.)

Of course, IMO, you could always use DJGPP's CP.EXE .../*.exe /mydir or use DJGPP's FIND -name *.exe -dosexec copy /b {} ; or whatever. So, there are various options.

And I still don't like the fact that /L in FD's version makes but doesn't delete temp dirs (even in pretend mode??). Eric Auer suggests it may have to in order to not be buggy (I dunno but annoying nonetheless, I don't think other XCOPYs do that).

---
Know your limits.h

Rugxulo

Homepage

Usono,
26.04.2008, 21:21

@ Rugxulo
 

FreeDOS XCOPY (rxcopy 1.3) dir attrib bug + patch

> Or just grab the updated binary w/ src here:
> rxcopy14.zip
> (52k)

(EDIT: Sorry in advance for bumping this old thread. Just putting this here for completeness' sake.)

Or try this very very tiny manual patch that I just figured out (easier than downloading a new version or recompiling, if you're lazy or minimalist, heh):

--------------------------------------------------------------------------
Older RxCopy 1.3 has a bug when trying to copy dirs w/ attribs (e.g. +r), so
either upgrade to 1.4 or unpack the UPX'd .EXE for 1.3 and make this change:


12c12
< 00001790: 807EE910 cmp b,[bp][-0017],010 ;" "
---
> 00001790: F646E910 test b,[bp][-0017],010 ;" "



http://www.coli.uni-saarland.de/~eric/stuff/soft/by-others/rxcopy14.zip (52k)

or

http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/dos/xcopy/rxcopy/

Back to index page
Thread view  Board view
22049 Postings in 2034 Threads, 396 registered users, 110 users online (0 registered, 110 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum