projects
/
platform
/
upstream
/
udisks2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf8d5b0
)
Make udisks_daemon_util_resolve_link() work when @name contains slashes
author
David Zeuthen
<zeuthen@gmail.com>
Thu, 13 Sep 2012 21:39:55 +0000
(17:39 -0400)
committer
David Zeuthen
<zeuthen@gmail.com>
Thu, 13 Sep 2012 22:01:47 +0000
(18:01 -0400)
Signed-off-by: David Zeuthen <zeuthen@gmail.com>
src/udisksdaemonutil.c
patch
|
blob
|
history
diff --git
a/src/udisksdaemonutil.c
b/src/udisksdaemonutil.c
index
ef925f5
..
0ad2185
100644
(file)
--- a/
src/udisksdaemonutil.c
+++ b/
src/udisksdaemonutil.c
@@
-257,10
+257,13
@@
udisks_daemon_util_resolve_link (const gchar *path,
if (num != -1)
{
char *absolute_path;
+ gchar *full_path_dir;
link_path[num] = '\0';
- absolute_path = g_build_filename (path, link_path, NULL);
+ full_path_dir = g_path_get_dirname (full_path);
+ absolute_path = g_build_filename (full_path_dir, link_path, NULL);
+ g_free (full_path_dir);
if (realpath (absolute_path, resolved_path) != NULL)
{
found_it = TRUE;