Hi,
I check where is problem with bug 3012747 [1]. And found that implementation of
libfm doesn't expect more then one beginning slash in its structure. I can fix
it[attachment] with resolving it same as '/' , but I am not sure if it is
correct as posix specify it as it can be implementation specific handling
(that is reason why I am not commit it). Do you thing that it is expected
behavior or on some posix systems is expected different behavior for path like
//tmp ???
Josef
[1]
http://sourceforge.net/tracker/?func=detail&aid=3012747&group_id=156956&atid=801864
--
Josef Reidinger
YaST team
maintainer of perl-Bootloader, YaST2-Repair, parts of webyast
From 1751a185ac1dbc33004dd8f26f115d05bc547e83 Mon Sep 17 00:00:00 2001
From: tux <[email protected]>
Date: Wed, 9 Jun 2010 19:08:39 +0200
Subject: [PATCH] fix issue with '//' as root (bnc#3012747)
Due to posix specification 1003.2 "4.11 Pathname resolution" slash
followed by consecutive slash may be interpretted in
implementation-defined manner. It is choosen to use // as root because
it just confuse users if it become different
---
src/base/fm-path.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/base/fm-path.c b/src/base/fm-path.c
index 937a9d7..8acd15a 100644
--- a/src/base/fm-path.c
+++ b/src/base/fm-path.c
@@ -51,8 +51,9 @@ FmPath* fm_path_new(const char* path)
if( path[0] == '/' ) /* if this is a absolute native path */
{
+ do { path = path+1; } while (path[0] == '/'); //fix issue with // (bnc#3012747), also be more paranoic
if (path[1])
- return fm_path_new_relative(root, path + 1);
+ return fm_path_new_relative(root, path);
else
/* special case: handle root dir */
return fm_path_ref( root );
--
1.7.0.3
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Lxde-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxde-list