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
Hide 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 )
...
@@ -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 */
#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
=
-
1
;
static
int
show_dot_files
;
/* at some point we may want to allow Winelib apps to set this */
/* at some point we may want to allow Winelib apps to set this */
static
const
int
is_case_sensitive
=
FALSE
;
static
const
int
is_case_sensitive
=
FALSE
;
...
@@ -501,20 +500,19 @@ static char *get_default_drive_device( const char *root )
...
@@ -501,20 +500,19 @@ static char *get_default_drive_device( const char *root )
/***********************************************************************
/***********************************************************************
* init_options
* 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
void
init_options
(
void
)
{
{
static
const
WCHAR
WineW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
0
};
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
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
];
char
tmp
[
80
];
HANDLE
root
,
hkey
;
HANDLE
root
,
hkey
;
DWORD
dummy
;
DWORD
dummy
;
OBJECT_ATTRIBUTES
attr
;
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
UNICODE_STRING
nameW
;
show_dot_files
=
show_dir_symlinks
=
0
;
show_dot_files
=
0
;
RtlOpenCurrentUser
(
KEY_ALL_ACCESS
,
&
root
);
RtlOpenCurrentUser
(
KEY_ALL_ACCESS
,
&
root
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
Length
=
sizeof
(
attr
);
...
@@ -534,12 +532,6 @@ static void init_options(void)
...
@@ -534,12 +532,6 @@ static void init_options(void)
WCHAR
*
str
=
(
WCHAR
*
)((
KEY_VALUE_PARTIAL_INFORMATION
*
)
tmp
)
->
Data
;
WCHAR
*
str
=
(
WCHAR
*
)((
KEY_VALUE_PARTIAL_INFORMATION
*
)
tmp
)
->
Data
;
show_dot_files
=
IS_OPTION_TRUE
(
str
[
0
]
);
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
(
hkey
);
}
}
NtClose
(
root
);
NtClose
(
root
);
...
@@ -555,7 +547,7 @@ BOOL DIR_is_hidden_file( const UNICODE_STRING *name )
...
@@ -555,7 +547,7 @@ BOOL DIR_is_hidden_file( const UNICODE_STRING *name )
{
{
WCHAR
*
p
,
*
end
;
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
;
if
(
show_dot_files
)
return
FALSE
;
end
=
p
=
name
->
Buffer
+
name
->
Length
/
sizeof
(
WCHAR
);
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,
...
@@ -776,11 +768,7 @@ static FILE_BOTH_DIR_INFORMATION *append_entry( void *info_ptr, ULONG_PTR *pos,
if
(
S_ISLNK
(
st
.
st_mode
))
if
(
S_ISLNK
(
st
.
st_mode
))
{
{
if
(
stat
(
long_name
,
&
st
)
==
-
1
)
return
NULL
;
if
(
stat
(
long_name
,
&
st
)
==
-
1
)
return
NULL
;
if
(
S_ISDIR
(
st
.
st_mode
))
if
(
S_ISDIR
(
st
.
st_mode
))
info
->
FileAttributes
|=
FILE_ATTRIBUTE_REPARSE_POINT
;
{
if
(
!
show_dir_symlinks
)
return
NULL
;
info
->
FileAttributes
|=
FILE_ATTRIBUTE_REPARSE_POINT
;
}
}
}
info
->
NextEntryOffset
=
total_len
;
info
->
NextEntryOffset
=
total_len
;
...
@@ -1104,7 +1092,7 @@ NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event,
...
@@ -1104,7 +1092,7 @@ NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event,
RtlEnterCriticalSection
(
&
dir_section
);
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
)
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