mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 11:40:07 +00:00
Use Windows ANSI versions of the PathFind... methods
Differential Revision: https://phabricator.kde.org/D9937
This commit is contained in:
parent
daaa084476
commit
6b259d7000
19
core/synctex/patches/16-use-windows-ansi-api-path-find.diff
Normal file
19
core/synctex/patches/16-use-windows-ansi-api-path-find.diff
Normal file
|
@ -0,0 +1,19 @@
|
|||
Use Windows ANSI versions of the PathFind... methods
|
||||
|
||||
Author: Michel Ludwig <michel.ludwig@kdemail.net>
|
||||
|
||||
|
||||
Index: synctex/synctex_parser_utils.c
|
||||
--- synctex.orig/synctex_parser_utils.c
|
||||
+++ synctex/synctex_parser_utils.c
|
||||
@@ -187,8 +187,8 @@ void _synctex_strip_last_path_extension(char * string) {
|
||||
char * last_component = NULL;
|
||||
char * last_extension = NULL;
|
||||
# if defined(SYNCTEX_WINDOWS)
|
||||
- last_component = PathFindFileName(string);
|
||||
- last_extension = PathFindExtension(string);
|
||||
+ last_component = PathFindFileNameA(string);
|
||||
+ last_extension = PathFindExtensionA(string);
|
||||
if(last_extension == NULL)return;
|
||||
if(last_component == NULL)last_component = string;
|
||||
if(last_extension>last_component){/* filter out paths like "my/dir/.hidden" */
|
|
@ -8,3 +8,4 @@
|
|||
13-fix-Wundef-warnings.diff
|
||||
14-fix-misc-compiler-warnings.diff
|
||||
15-prevent-leaks-and-segfault.diff
|
||||
16-use-windows-ansi-api-path-find.diff
|
||||
|
|
|
@ -187,8 +187,8 @@ void _synctex_strip_last_path_extension(char * string) {
|
|||
char * last_component = NULL;
|
||||
char * last_extension = NULL;
|
||||
# if defined(SYNCTEX_WINDOWS)
|
||||
last_component = PathFindFileName(string);
|
||||
last_extension = PathFindExtension(string);
|
||||
last_component = PathFindFileNameA(string);
|
||||
last_extension = PathFindExtensionA(string);
|
||||
if(last_extension == NULL)return;
|
||||
if(last_component == NULL)last_component = string;
|
||||
if(last_extension>last_component){/* filter out paths like "my/dir/.hidden" */
|
||||
|
|
Loading…
Reference in a new issue