Hide associated files. Fixes Last Express when installing from an ISO. Thanks ripsaw
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3633
This commit is contained in:
parent
c77c12be15
commit
a408781809
2 changed files with 4 additions and 2 deletions
|
@ -289,7 +289,7 @@ bool isoDrive::FindNext(DOS_DTA &dta) {
|
|||
else findAttr |= DOS_ATTR_ARCHIVE;
|
||||
if (IS_HIDDEN(de.fileFlags)) findAttr |= DOS_ATTR_HIDDEN;
|
||||
|
||||
if (!(isRoot && de.ident[0]=='.') && WildFileCmp((char*)de.ident, pattern)
|
||||
if (!IS_ASSOC(de.fileFlags) && !(isRoot && de.ident[0]=='.') && WildFileCmp((char*)de.ident, pattern)
|
||||
&& !(~attr & findAttr & (DOS_ATTR_DIRECTORY | DOS_ATTR_HIDDEN | DOS_ATTR_SYSTEM))) {
|
||||
|
||||
/* file is okay, setup everything to be copied in DTA Block */
|
||||
|
@ -541,7 +541,7 @@ bool isoDrive :: lookup(isoDirEntry *de, const char *path) {
|
|||
// look for the current path element
|
||||
int dirIterator = GetDirIterator(de);
|
||||
while (!found && GetNextDirEntry(dirIterator, de)) {
|
||||
if (0 == strncasecmp((char*) de->ident, name, ISO_MAX_FILENAME_LENGTH)) {
|
||||
if (!IS_ASSOC(de->fileFlags) && (0 == strncasecmp((char*) de->ident, name, ISO_MAX_FILENAME_LENGTH))) {
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -298,11 +298,13 @@ struct isoDirEntry {
|
|||
#endif
|
||||
|
||||
#define ISO_FRAMESIZE 2048
|
||||
#define ISO_ASSOCIATED 4
|
||||
#define ISO_DIRECTORY 2
|
||||
#define ISO_HIDDEN 1
|
||||
#define ISO_MAX_FILENAME_LENGTH 37
|
||||
#define ISO_MAXPATHNAME 256
|
||||
#define ISO_FIRST_VD 16
|
||||
#define IS_ASSOC(fileFlags) (fileFlags & ISO_ASSOCIATED)
|
||||
#define IS_DIR(fileFlags) (fileFlags & ISO_DIRECTORY)
|
||||
#define IS_HIDDEN(fileFlags) (fileFlags & ISO_HIDDEN)
|
||||
#define ISO_MAX_HASH_TABLE_SIZE 100
|
||||
|
|
Loading…
Add table
Reference in a new issue