projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cae1d1
)
Fixed PathMakePathA (returned true even if it can't create the last folder of the...
author
François Dubois
<fdubois@devolutions.net>
Wed, 12 Jul 2017 18:47:08 +0000
(14:47 -0400)
committer
François Dubois
<fdubois@devolutions.net>
Wed, 12 Jul 2017 18:47:08 +0000
(14:47 -0400)
winpr/libwinpr/path/shell.c
patch
|
blob
|
history
diff --git
a/winpr/libwinpr/path/shell.c
b/winpr/libwinpr/path/shell.c
index
386cac3
..
891ce98
100644
(file)
--- a/
winpr/libwinpr/path/shell.c
+++ b/
winpr/libwinpr/path/shell.c
@@
-465,6
+465,7
@@
BOOL PathMakePathA(LPCSTR path, LPSECURITY_ATTRIBUTES lpAttributes)
const char delim = PathGetSeparatorA(PATH_STYLE_NATIVE);
char* dup;
char* p;
+ BOOL result = TRUE;
/* we only operate on a non-null, absolute path */
if (!path || *path != delim)
@@
-480,14
+481,17
@@
BOOL PathMakePathA(LPCSTR path, LPSECURITY_ATTRIBUTES lpAttributes)
if (mkdir(dup, 0777) != 0)
if (errno != EEXIST)
+ {
+ result = FALSE;
break;
+ }
if (p)
*p = delim;
}
free(dup);
- return (
p == NULL
);
+ return (
result
);
#endif
}