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
702941ea
Commit
702941ea
authored
Sep 09, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version: Check the Windows directory first in VerFindFileA/W.
parent
c8d91237
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
22 deletions
+28
-22
install.c
dlls/version/tests/install.c
+2
-2
version.c
dlls/version/version.c
+26
-20
No files found.
dlls/version/tests/install.c
View file @
702941ea
...
...
@@ -89,7 +89,7 @@ static void test_find_file(void)
"got %d(%s) expected MAX_PATH
\n
"
,
dwOut
,
outBuf
);
break
;
default:
todo_wine
ok
(
0
,
"Got unexpected return value %x
\n
"
,
ret
);
ok
(
0
,
"Got unexpected return value %x
\n
"
,
ret
);
}
dwCur
=
MAX_PATH
;
...
...
@@ -111,7 +111,7 @@ static void test_find_file(void)
"got %d(%s) expected MAX_PATH
\n
"
,
dwOut
,
outBuf
);
break
;
default:
todo_wine
ok
(
0
,
"Got unexpected return value %x
\n
"
,
ret
);
ok
(
0
,
"Got unexpected return value %x
\n
"
,
ret
);
}
}
}
...
...
dlls/version/version.c
View file @
702941ea
...
...
@@ -1101,7 +1101,7 @@ DWORD WINAPI VerFindFileA(
const
char
*
destDir
;
unsigned
int
curDirSizeReq
;
unsigned
int
destDirSizeReq
;
char
systemDir
[
MAX_PATH
];
char
winDir
[
MAX_PATH
],
systemDir
[
MAX_PATH
];
/* Print out debugging information */
TRACE
(
"flags = %x filename=%s windir=%s appdir=%s curdirlen=%p(%u) destdirlen=%p(%u)
\n
"
,
...
...
@@ -1132,17 +1132,20 @@ DWORD WINAPI VerFindFileA(
}
else
/* not a shared file */
{
if
(
lpszAppDir
)
destDir
=
lpszAppDir
?
lpszAppDir
:
""
;
if
(
lpszFilename
)
{
destDir
=
lpszAppDir
;
if
(
lpszFilename
)
GetWindowsDirectoryA
(
winDir
,
MAX_PATH
);
if
(
testFileExistenceA
(
destDir
,
lpszFilename
,
FALSE
))
curDir
=
destDir
;
else
if
(
testFileExistenceA
(
winDir
,
lpszFilename
,
FALSE
))
{
curDir
=
winDir
;
retval
|=
VFF_CURNEDEST
;
}
else
if
(
testFileExistenceA
(
systemDir
,
lpszFilename
,
FALSE
))
{
if
(
testFileExistenceA
(
destDir
,
lpszFilename
,
FALSE
))
curDir
=
destDir
;
else
if
(
testFileExistenceA
(
systemDir
,
lpszFilename
,
FALSE
))
{
curDir
=
systemDir
;
retval
|=
VFF_CURNEDEST
;
}
curDir
=
systemDir
;
retval
|=
VFF_CURNEDEST
;
}
}
}
...
...
@@ -1195,7 +1198,7 @@ DWORD WINAPI VerFindFileW( DWORD flags,LPCWSTR lpszFilename,LPCWSTR lpszWinDir,
const
WCHAR
*
destDir
;
unsigned
int
curDirSizeReq
;
unsigned
int
destDirSizeReq
;
WCHAR
systemDir
[
MAX_PATH
];
WCHAR
winDir
[
MAX_PATH
],
systemDir
[
MAX_PATH
];
/* Print out debugging information */
TRACE
(
"flags = %x filename=%s windir=%s appdir=%s curdirlen=%p(%u) destdirlen=%p(%u)
\n
"
,
...
...
@@ -1226,17 +1229,20 @@ DWORD WINAPI VerFindFileW( DWORD flags,LPCWSTR lpszFilename,LPCWSTR lpszWinDir,
}
else
/* not a shared file */
{
if
(
lpszAppDir
)
destDir
=
lpszAppDir
?
lpszAppDir
:
&
emptyW
;
if
(
lpszFilename
)
{
destDir
=
lpszAppDir
;
if
(
lpszFilename
)
GetWindowsDirectoryW
(
winDir
,
MAX_PATH
);
if
(
testFileExistenceW
(
destDir
,
lpszFilename
,
FALSE
))
curDir
=
destDir
;
else
if
(
testFileExistenceW
(
winDir
,
lpszFilename
,
FALSE
))
{
curDir
=
winDir
;
retval
|=
VFF_CURNEDEST
;
}
else
if
(
testFileExistenceW
(
systemDir
,
lpszFilename
,
FALSE
))
{
if
(
testFileExistenceW
(
destDir
,
lpszFilename
,
FALSE
))
curDir
=
destDir
;
else
if
(
testFileExistenceW
(
systemDir
,
lpszFilename
,
FALSE
))
{
curDir
=
systemDir
;
retval
|=
VFF_CURNEDEST
;
}
curDir
=
systemDir
;
retval
|=
VFF_CURNEDEST
;
}
}
}
...
...
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