Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Felix Münchhalfen
wine
Commits
220312e9
Commit
220312e9
authored
24 years ago
by
Andreas Mohr
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Skip directory symlinks in DOSFS_FindNextEx.
parent
044f028f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
files/dos_fs.c
+10
-1
10 additions, 1 deletion
files/dos_fs.c
files/file.c
+14
-4
14 additions, 4 deletions
files/file.c
include/winnt.h
+1
-0
1 addition, 0 deletions
include/winnt.h
with
25 additions
and
5 deletions
files/dos_fs.c
+
10
−
1
View file @
220312e9
...
...
@@ -1362,7 +1362,7 @@ DWORD WINAPI GetFullPathNameW( LPCWSTR name, DWORD len, LPWSTR buffer,
*/
static
int
DOSFS_FindNextEx
(
FIND_FIRST_INFO
*
info
,
WIN32_FIND_DATAA
*
entry
)
{
BYTE
attr
=
info
->
attr
|
FA_UNUSED
|
FA_ARCHIVE
|
FA_RDONLY
;
DWORD
attr
=
info
->
attr
|
FA_UNUSED
|
FA_ARCHIVE
|
FA_RDONLY
|
FILE_ATTRIBUTE_SYMLINK
;
UINT
flags
=
DRIVE_GetFlags
(
info
->
drive
);
char
*
p
,
buffer
[
MAX_PATHNAME_LEN
];
const
char
*
drive_path
;
...
...
@@ -1436,6 +1436,15 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATAA *entry )
WARN
(
"can't stat %s
\n
"
,
buffer
);
continue
;
}
if
((
fileinfo
.
dwFileAttributes
&
FILE_ATTRIBUTE_SYMLINK
)
&&
(
fileinfo
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
))
{
static
int
show_dir_symlinks
=
-
1
;
if
(
show_dir_symlinks
==
-
1
)
show_dir_symlinks
=
PROFILE_GetWineIniBool
(
"wine"
,
"ShowDirSymlinks"
,
0
);
if
(
!
show_dir_symlinks
)
continue
;
}
if
(
fileinfo
.
dwFileAttributes
&
~
attr
)
continue
;
/* We now have a matching entry; fill the result and return */
...
...
This diff is collapsed.
Click to expand it.
files/file.c
+
14
−
4
View file @
220312e9
...
...
@@ -617,14 +617,24 @@ BOOL FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info )
{
struct
stat
st
;
if
(
!
unixName
||
!
info
)
return
FALSE
;
if
(
stat
(
unixName
,
&
st
)
==
-
1
)
if
(
lstat
(
unixName
,
&
st
)
==
-
1
)
{
FILE_SetDosError
();
return
FALSE
;
}
FILE_FillInfo
(
&
st
,
info
);
if
(
!
S_ISLNK
(
st
.
st_mode
))
FILE_FillInfo
(
&
st
,
info
);
else
{
/* do a "real" stat to find out
about the type of the symlink destination */
if
(
stat
(
unixName
,
&
st
)
==
-
1
)
{
FILE_SetDosError
();
return
FALSE
;
}
FILE_FillInfo
(
&
st
,
info
);
info
->
dwFileAttributes
|=
FILE_ATTRIBUTE_SYMLINK
;
}
return
TRUE
;
}
...
...
This diff is collapsed.
Click to expand it.
include/winnt.h
+
1
−
0
View file @
220312e9
...
...
@@ -2891,6 +2891,7 @@ typedef enum tagSID_NAME_USE {
#define FILE_ATTRIBUTE_XACTION_WRITE 0x00000400L
#define FILE_ATTRIBUTE_COMPRESSED 0x00000800L
#define FILE_ATTRIBUTE_OFFLINE 0x00001000L
#define FILE_ATTRIBUTE_SYMLINK 0x80000000L
/* Not in Windows API */
/* File notification flags */
#define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment