www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/01/09/02:58:54

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Wed, 9 Jan 2002 09:54:41 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
cc: djgpp-workers AT delorie DOT com, Tim Van Holder <tim DOT van DOT holder AT pandora DOT be>
Subject: Re: Proposed lstat.c patch for Win2000/XP device bit fix
In-Reply-To: <10201090418.AA14643@clio.rice.edu>
Message-ID: <Pine.SUN.3.91.1020109095423.655E-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 8 Jan 2002, Charles Sandmann wrote:

> Seems to work in quick testing:
> 
> *** lstat.c_	Tue Dec 11 21:28:06 2001
> --- lstat.c	Tue Jan  8 22:09:36 2002
> *************** stat_assist(const char *path, struct sta
> *** 600,605 ****
> --- 600,614 ----
>         if ( !(ff_blk.ff_attrib & 0x07) )  /* no R, H or S bits set */
>           statbuf->st_mode |= WRITE_ACCESS;
>   
> +       /* Windows 2000 and XP - devices don't set attributes correctly */
> +       if( (_djstat_fail_bits & _STFAIL_TRUENAME) && !ff_blk.ff_fsize &&
> +           !ff_blk.ff_ftime && (ff_blk.ff_fdate == 33) && 
> +           !ff_blk.lfn_ctime && (ff_blk.lfn_cdate == 33) && 
> +           !ff_blk.lfn_atime && (ff_blk.lfn_adate == 33) && 
> +           !strcmp(ff_blk.lfn_magic,"LFN32") &&
> +           /* strlen(ff_blk.ff_name) == 3 && */ ff_blk.ff_attrib == 0x20)
> +         ff_blk.ff_attrib = 0x40;  
> + 

Looks good to me.

I think a corresponding change (in stat.c) should be added to the
v2.03 refresh release.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019