On 5/7/07, Joe Ripley <vitaminjoe@xxxxxxxxx> wrote:
On 5/7/07, Bart Oldeman <bartoldeman@xxxxxxxxxxxxxxxxxxxxx> wrote: > It's an internal DOSEMU problem, and an old one at that! > The problem is that DOSEMU emulates the "archive" DOS attribute > through the user x bit. Very few DOS programs attempt to set or reset > the archive attribute on directories, but pkunzip 2.50 does.
Actually, I had some time to do some testing, and I found that it's not that pkunzip is attempting to set the archive attribute. When run with the debug messages turned on, pkunzip tries to create the directory with an attribute of 0x10 (i.e. a regular file) rather than 0x20 (a directory). As a hack to fix it, all I did was add one line to the beginning of the set_dos_attr() function in mfs.c: if (S_ISDIR(mode)) attr &= DIRECTORY; pkunzip extracts with directories properly now: ---------------------------------------------------------------------- drwxr-xr-x 2 bbs users 240 2007-05-07 16:05 bin drwxr-xr-x 2 bbs users 208 2007-05-07 16:05 data drwxr-xr-x 2 bbs users 168 2007-05-07 16:06 docs drwxr-xr-x 2 bbs users 80 2007-05-07 16:05 language drwxr-xr-x 2 bbs users 584 2007-05-07 16:06 menus drwxr-xr-x 2 bbs users 144 2007-05-07 16:06 text ---------------------------------------------------------------------- -- Joe Ripley vitaminjoe@xxxxxxxxx - To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html