basic hidden file detection. Used as initial check by mechwarrior 2
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2128
This commit is contained in:
		
							parent
							
								
									460908f0e7
								
							
						
					
					
						commit
						8618ef8870
					
				
					 2 changed files with 9 additions and 6 deletions
				
			
		|  | @ -16,7 +16,7 @@ | |||
|  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||||
|  */ | ||||
| 
 | ||||
| /* $Id: drive_iso.cpp,v 1.5 2005-02-10 10:20:51 qbix79 Exp $ */ | ||||
| /* $Id: drive_iso.cpp,v 1.6 2005-03-16 20:44:56 qbix79 Exp $ */ | ||||
| 
 | ||||
| #include <cctype> | ||||
| #include <cstring> | ||||
|  | @ -280,10 +280,11 @@ bool isoDrive::FindNext(DOS_DTA &dta) | |||
| 	 | ||||
| 	while (dirIter != searchCache.end()) { | ||||
| 		isoDirEntry &de = *dirIter; | ||||
| 		Bit8u findAttr; | ||||
| 		if (IS_DIR(de.fileFlags)) findAttr = DOS_ATTR_DIRECTORY; | ||||
| 		else findAttr = DOS_ATTR_ARCHIVE; | ||||
| 		 | ||||
| 		Bit8u findAttr = 0; | ||||
| 		if (IS_DIR(de.fileFlags)) findAttr |= DOS_ATTR_DIRECTORY; | ||||
| 		else findAttr |= DOS_ATTR_ARCHIVE; | ||||
| 		if (IS_HIDDEN(de.fileFlags)) findAttr |= DOS_ATTR_HIDDEN; | ||||
| 
 | ||||
| 		if (WildFileCmp((char*)de.ident, pattern) | ||||
| 			&& !(~attr & findAttr & (DOS_ATTR_DIRECTORY | DOS_ATTR_HIDDEN | DOS_ATTR_SYSTEM))) { | ||||
| 			 | ||||
|  |  | |||
|  | @ -16,7 +16,7 @@ | |||
|  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||||
|  */ | ||||
| 
 | ||||
| /* $Id: drives.h,v 1.26 2005-02-10 10:20:52 qbix79 Exp $ */ | ||||
| /* $Id: drives.h,v 1.27 2005-03-16 20:44:55 qbix79 Exp $ */ | ||||
| 
 | ||||
| #ifndef _DRIVES_H__ | ||||
| #define _DRIVES_H__ | ||||
|  | @ -274,9 +274,11 @@ struct isoDirEntry { | |||
| 
 | ||||
| #define ISO_FRAMESIZE		2048 | ||||
| #define ISO_DIRECTORY		2 | ||||
| #define ISO_HIDDEN		1 | ||||
| #define ISO_MAXPATHNAME		256 | ||||
| #define ISO_FIRST_VD		16 | ||||
| #define IS_DIR(fileFlags)	(fileFlags & ISO_DIRECTORY) | ||||
| #define IS_HIDDEN(fileFlags)	(fileFlags & ISO_HIDDEN) | ||||
| 
 | ||||
| class isoDrive : public DOS_Drive { | ||||
| public: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue