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
d191d5bc
Commit
d191d5bc
authored
Aug 29, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use a RunOnce function to initialize directory lookup options.
parent
21c395cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
directory.c
dlls/ntdll/directory.c
+8
-7
No files found.
dlls/ntdll/directory.c
View file @
d191d5bc
...
...
@@ -157,7 +157,8 @@ union file_directory_info
FILE_ID_FULL_DIRECTORY_INFORMATION
id_full
;
};
static
int
show_dot_files
=
-
1
;
static
BOOL
show_dot_files
;
static
RTL_RUN_ONCE
init_once
=
RTL_RUN_ONCE_INIT
;
/* at some point we may want to allow Winelib apps to set this */
static
const
int
is_case_sensitive
=
FALSE
;
...
...
@@ -1036,7 +1037,7 @@ static BOOLEAN get_dir_case_sensitivity( const char *dir )
*
* Initialize the show_dot_files options.
*/
static
void
init_options
(
void
)
static
DWORD
WINAPI
init_options
(
RTL_RUN_ONCE
*
once
,
void
*
param
,
void
**
context
)
{
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
};
...
...
@@ -1046,8 +1047,6 @@ static void init_options(void)
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
show_dot_files
=
0
;
RtlOpenCurrentUser
(
KEY_ALL_ACCESS
,
&
root
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
root
;
...
...
@@ -1077,6 +1076,7 @@ static void init_options(void)
#ifdef linux
ignore_file
(
"/sys"
);
#endif
return
TRUE
;
}
...
...
@@ -1089,7 +1089,8 @@ BOOL DIR_is_hidden_file( const UNICODE_STRING *name )
{
WCHAR
*
p
,
*
end
;
if
(
show_dot_files
==
-
1
)
init_options
();
RtlRunOnceExecuteOnce
(
&
init_once
,
init_options
,
NULL
,
NULL
);
if
(
show_dot_files
)
return
FALSE
;
end
=
p
=
name
->
Buffer
+
name
->
Length
/
sizeof
(
WCHAR
);
...
...
@@ -2053,9 +2054,9 @@ NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event,
io
->
Information
=
0
;
Rtl
EnterCriticalSection
(
&
dir_section
);
Rtl
RunOnceExecuteOnce
(
&
init_once
,
init_options
,
NULL
,
NULL
);
if
(
show_dot_files
==
-
1
)
init_options
(
);
RtlEnterCriticalSection
(
&
dir_section
);
cwd
=
open
(
"."
,
O_RDONLY
);
if
(
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