Francois Gouget : winetest: Fix handling of relative -d directories.
Alexandre Julliard
julliard at winehq.org
Mon Jul 26 15:30:28 CDT 2021
Module: wine
Branch: master
Commit: 2197bc9a92fac63b9ffe1008e0c74261028ad3e1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2197bc9a92fac63b9ffe1008e0c74261028ad3e1
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Jul 26 11:55:45 2021 +0200
winetest: Fix handling of relative -d directories.
Convert them to an absolute path so they result in a command line which
is still valid after changing the current directory in CreateProcess().
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/winetest/main.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/programs/winetest/main.c b/programs/winetest/main.c
index fa773e28d4f..7ced565447b 100644
--- a/programs/winetest/main.c
+++ b/programs/winetest/main.c
@@ -1066,7 +1066,10 @@ run_tests (char *logname, char *outdir)
report (R_FATAL, "Could not open logfile: %u", GetLastError());
if (outdir)
- strcpy( tempdir, outdir);
+ {
+ /* Get a full path so it is still valid after a chdir */
+ GetFullPathNameA( outdir, ARRAY_SIZE(tempdir), tempdir, NULL );
+ }
else
{
strcpy( tempdir, tmppath );
More information about the wine-cvs
mailing list