Commit Graph

98 Commits

Author SHA1 Message Date
Alexandre Julliard 9bf46d5ce6 ntdll: Make wine_nt_to_unix_file_name() and wine_unix_to_nt_file_name() follow NT syscall conventions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-02 22:57:38 +02:00
Jacek Caban 9091121669 kernel32: Remove no longer used variables.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-02 19:08:04 +01:00
Alexandre Julliard 0c631ebb23 kernel32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 19:38:42 +02:00
Alexandre Julliard 6f862a1ad8 ntdll: Allocate the buffer in the caller for wine_unix_to_nt_file_name().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-09 15:34:00 +02:00
Alexandre Julliard 368e3a93b8 ntdll: Allocate the return buffer in the caller for wine_nt_to_unix_file_name().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-09 13:04:05 +02:00
Alexandre Julliard 49fcd632e4 ntdll: Disallow relative paths in wine_unix_to_nt_file_name(), handle them in the caller.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-08 16:05:49 +02:00
Alexandre Julliard f8699c0a71 kernel32: Move RemoveDirectoryA/W() implementation to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-08 16:05:26 +02:00
Paul Gofman 8898a69519 ntdll: Use case sensitive search for \??\unix file names only.
Fixes crash on start in Planet Zoo and Jurassic World Evolution.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 19:40:28 +02:00
Alexandre Julliard b6c9401882 kernel32: Move some file functions to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 20:53:02 +02:00
Gijs Vermeulen e7abfe9533 kernel32: Remove unused functions is_executable() and get_table_entry().
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-01 22:03:16 +02:00
Sven Baars 1b6b0cda7a kernel32: Fix a memory leak in MoveFileWithProgressW (Valgrind).
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 17:19:11 +02:00
Zebediah Figura 4b2f8c80fb kernel32: Reimplement is_same_file() using FileIdInformation.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-09 09:12:00 +02:00
Zebediah Figura 8ca5d4af90 kernel32: Reimplement MoveFileWithProgress() on top of NtSetInformationFile(FileRenameInformation).
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:18 +01:00
Zebediah Figura 4e98b0810b kernel32: Reimplement CreateHardLink() on top of NtSetInformationFile(FileLinkInformation).
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-04 09:53:02 +01:00
Piotr Caban 7ca1c4900e kernel32: Set all %eax bits on Wow64EnableWow64FsRedirection return.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47565
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-05 23:36:23 +01:00
Alexandre Julliard 4405195b3c kernel32: Move GetSystemWow64Directory() functions to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 22:05:58 +01:00
Alexandre Julliard 8d25965e12 kernel32: Move SearchPath functions to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-04 09:44:29 +02:00
Alexandre Julliard 6113c46856 kernel32: Use RtlGetSearchPath() in SearchPathW() implementation.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:08 +02:00
Alexandre Julliard 14fbecee65 kernel32: Add set_ntstatus() helper.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 09:43:27 +02:00
Alexandre Julliard e3e1bede1b kernel32: Move some path functions to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 16:50:44 +02:00
Alexandre Julliard 2c73a08655 kernel32: Move some directory functions to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-12 16:15:16 +02:00
Huw Davies 3e927c4aec ntdll: Extend NtGetTickCount() to return 64-bits. Forward kernel32 functions to it.
Marking the function as DECLSPEC_HOTPATCH to avoid reopening
https://bugs.winehq.org/show_bug.cgi?id=36486 .  Even with -fno-PIC,
without DECLSPEC_HOTPATCH the generated code has a pushl at offset 7
that triggers the failure.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:54:23 +02:00
Erich E. Hoover 2295d937a8 kernel32: NeedCurrentDirectoryForExePath does not use the registry.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-26 13:38:36 +02:00
Jon Doron aa5107b165 kernel32: Fix MOVEFILE_REPLACE_EXISTING between devices.
Fix the case of rename fails because when done between 2 different
devices and the MOVEFILE_REPLACE_EXISTING is set.

Signed-off-by: Jon Doron <arilou@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-29 19:54:01 +01:00
Jon Doron 69d3c7a00f kernel32: Fix MoveFileWithProgressW from closing same handle twice.
Signed-off-by: Jon Doron <arilou@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-29 19:54:01 +01:00
Dmitry Timoshkov ccf9b18ea0 kernel32: GetLongPathName should fail when called with a wildcard.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 09:55:02 +02:00
Dmitry Timoshkov 3a78ec672a kernel32: GetShortPathName should fail when called with a wildcard.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 09:55:01 +02:00
Louis Lenders 35f62f644d kernel32: Add stub for MoveFileTransacted{A,W}.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45995
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-15 20:13:51 +02:00
Dmitry Timoshkov f184a396a8 kernel32: MoveFile should make sure that it has the delete access to the source file.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-15 20:13:50 +02:00
Dmitry Timoshkov 7edfcd63ad kernel32: MoveFile(source, source) should succeed.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-15 20:13:50 +02:00
Dmitry Timoshkov 97d2d9bf60 kernel32: Add support for MOVEFILE_WRITE_THROUGH to MoveFile.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:15:59 +02:00
Michael Stefaniuc fe70e0e58f kernel32: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:15:59 +02:00
Alexandre Julliard a8d291c0c0 kernel32: Implement safe search mode for SearchPath.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-29 15:51:27 +02:00
Alexandre Julliard e99811aee2 kernel32: Implement SetDefaultDllDirectories.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-28 13:29:22 +02:00
Austin English 5003f15289 kernel32: Add SetDefaultDllDirectories stub.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-28 00:07:57 +09:00
Peter Beutner c90e46b66d kernel32: Properly handle double delimiters in GetShortPathName/GetLongPathName.
Signed-off-by: Peter Beutner <p.beutner@gmx.net>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-16 00:00:43 +09:00
Sebastian Lackner d638df9f3e kernel32: Fix possible leak of directory handle in RemoveDirectoryW.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-04 01:03:27 +09:00
Austin English 6b36d7cfef kernel32: Add SetSearchPathMode stub.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-14 22:16:50 +09:00
Jeremy White 7dea64279e kernel32: Revise GetLongPathNameA to avoid overriding the input on long names.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-24 11:57:57 +01:00
Jeremy White 9f3f918f2c kernel32: Preserve a '/' delimiter in GetLongPathName and GetShortPathName.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-24 11:55:36 +01:00
Jeremy White 440030b938 kernel32: Advance over the input buffer when stripping ./.
This is the same fix for GetLongPathName that was contained in a fix for
GetShortPathName in commit 9178d037d7.

Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-24 11:54:36 +01:00
Jacek Caban 6a7363b694 kernel32: Call registry functions with full key path.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-19 23:56:39 +09:00
Thomas Faller 9178d037d7 kernel32: Fix invalid write.
Signed-off-by: Thomas Faller <tfaller1@gmx.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-02 23:02:21 +09:00
Piotr Caban ff698220c1 include: Fix CreateSymbolicLink and TryAcquireSRWLockExclusive prototypes.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-01 22:53:52 +09:00
Jacek Caban 8294722142 kernel32: Pass SYNCHRONIZE flag to NtOpenFile.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-30 21:01:59 +09:00
Jacek Caban 0c8edbcc80 kernel32: Pass SYNCHRONIZE access flag to NtCreateFile.
Office clicktorun patched ntdll functions expect them to be set.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-29 21:20:09 +09:00
Michael Müller 803e9cfb66 kernel32: Correctly check for an empty short filename in GetShortPathNameW (Coverity). 2015-06-01 14:46:34 +09:00
Jacek Caban 12a134fdc4 kernel32: Fixed buffer overflow in GetShortPathNameW. 2015-05-25 21:43:17 +09:00
Andrew Eikum d9a27e9ca0 kernel32: Implement CheckNameLegalDOS8Dot3. 2015-05-13 22:05:42 +09:00
Andrew Eikum 65f2690203 kernel32: Support extended pathnames in GetShortPathName. 2015-05-06 08:36:04 +09:00