Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
51fbfbb9
Commit
51fbfbb9
authored
Oct 27, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make show_dir_symlinks the default and get rid of the option.
parent
f8037bdd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
18 deletions
+6
-18
directory.c
dlls/ntdll/directory.c
+6
-18
No files found.
dlls/ntdll/directory.c
View file @
51fbfbb9
...
...
@@ -130,8 +130,7 @@ static inline int getdents64( int fd, KERNEL_DIRENT64 *de, unsigned int size )
#define MAX_DIR_ENTRY_LEN 255
/* max length of a directory entry in chars */
static
int
show_dir_symlinks
=
-
1
;
static
int
show_dot_files
;
static
int
show_dot_files
=
-
1
;
/* at some point we may want to allow Winelib apps to set this */
static
const
int
is_case_sensitive
=
FALSE
;
...
...
@@ -501,20 +500,19 @@ static char *get_default_drive_device( const char *root )
/***********************************************************************
* init_options
*
* Initialize the show_d
ir_symlinks and show_d
ot_files options.
* Initialize the show_dot_files options.
*/
static
void
init_options
(
void
)
{
static
const
WCHAR
WineW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
ShowDotFilesW
[]
=
{
'S'
,
'h'
,
'o'
,
'w'
,
'D'
,
'o'
,
't'
,
'F'
,
'i'
,
'l'
,
'e'
,
's'
,
0
};
static
const
WCHAR
ShowDirSymlinksW
[]
=
{
'S'
,
'h'
,
'o'
,
'w'
,
'D'
,
'i'
,
'r'
,
'S'
,
'y'
,
'm'
,
'l'
,
'i'
,
'n'
,
'k'
,
's'
,
0
};
char
tmp
[
80
];
HANDLE
root
,
hkey
;
DWORD
dummy
;
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
show_dot_files
=
show_dir_symlinks
=
0
;
show_dot_files
=
0
;
RtlOpenCurrentUser
(
KEY_ALL_ACCESS
,
&
root
);
attr
.
Length
=
sizeof
(
attr
);
...
...
@@ -534,12 +532,6 @@ static void init_options(void)
WCHAR
*
str
=
(
WCHAR
*
)((
KEY_VALUE_PARTIAL_INFORMATION
*
)
tmp
)
->
Data
;
show_dot_files
=
IS_OPTION_TRUE
(
str
[
0
]
);
}
RtlInitUnicodeString
(
&
nameW
,
ShowDirSymlinksW
);
if
(
!
NtQueryValueKey
(
hkey
,
&
nameW
,
KeyValuePartialInformation
,
tmp
,
sizeof
(
tmp
),
&
dummy
))
{
WCHAR
*
str
=
(
WCHAR
*
)((
KEY_VALUE_PARTIAL_INFORMATION
*
)
tmp
)
->
Data
;
show_dir_symlinks
=
IS_OPTION_TRUE
(
str
[
0
]
);
}
NtClose
(
hkey
);
}
NtClose
(
root
);
...
...
@@ -555,7 +547,7 @@ BOOL DIR_is_hidden_file( const UNICODE_STRING *name )
{
WCHAR
*
p
,
*
end
;
if
(
show_d
ir_symlink
s
==
-
1
)
init_options
();
if
(
show_d
ot_file
s
==
-
1
)
init_options
();
if
(
show_dot_files
)
return
FALSE
;
end
=
p
=
name
->
Buffer
+
name
->
Length
/
sizeof
(
WCHAR
);
...
...
@@ -776,11 +768,7 @@ static FILE_BOTH_DIR_INFORMATION *append_entry( void *info_ptr, ULONG_PTR *pos,
if
(
S_ISLNK
(
st
.
st_mode
))
{
if
(
stat
(
long_name
,
&
st
)
==
-
1
)
return
NULL
;
if
(
S_ISDIR
(
st
.
st_mode
))
{
if
(
!
show_dir_symlinks
)
return
NULL
;
info
->
FileAttributes
|=
FILE_ATTRIBUTE_REPARSE_POINT
;
}
if
(
S_ISDIR
(
st
.
st_mode
))
info
->
FileAttributes
|=
FILE_ATTRIBUTE_REPARSE_POINT
;
}
info
->
NextEntryOffset
=
total_len
;
...
...
@@ -1104,7 +1092,7 @@ NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event,
RtlEnterCriticalSection
(
&
dir_section
);
if
(
show_d
ir_symlink
s
==
-
1
)
init_options
();
if
(
show_d
ot_file
s
==
-
1
)
init_options
();
if
((
cwd
=
open
(
"."
,
O_RDONLY
))
!=
-
1
&&
fchdir
(
fd
)
!=
-
1
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment