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:
eb1c750
)
Use stat instead of lstat to iterate /Volumes
author
Armin Novak
<armin.novak@thincast.com>
Thu, 12 Sep 2019 12:35:01 +0000
(14:35 +0200)
committer
Armin Novak
<armin.novak@thincast.com>
Thu, 12 Sep 2019 12:35:01 +0000
(14:35 +0200)
Some entries are symbolic links, so follow them and check the link
target for being a directory.
channels/rdpdr/client/rdpdr_main.c
patch
|
blob
|
history
diff --git
a/channels/rdpdr/client/rdpdr_main.c
b/channels/rdpdr/client/rdpdr_main.c
index
b7e88c0
..
af78c68
100644
(file)
--- a/
channels/rdpdr/client/rdpdr_main.c
+++ b/
channels/rdpdr/client/rdpdr_main.c
@@
-405,7
+405,8
@@
static UINT handle_hotplug(rdpdrPlugin* rdpdr)
if (pDirent->d_name[0] != '.')
{
sprintf_s(fullpath, ARRAYSIZE(fullpath), "%s/%s", szdir, pDirent->d_name);
- lstat(fullpath, &buf);
+ if (stat(fullpath, &buf) != 0)
+ continue;
if (S_ISDIR(buf.st_mode))
{