Skip to content

Commit

Permalink
Use trim_path when we compare paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tails developers authored and daniel-baumann committed Apr 5, 2012
1 parent 8805080 commit 7a8eabf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/live-helpers
Expand Up @@ -1306,8 +1306,8 @@ get_custom_mounts ()
done

# ensure that no multiple-/ occur in paths
local full_source="$(echo ${backing}/${source}/ | sed -e 's|/\+|/|g')"
local full_dest="$(echo ${rootmnt}/${dest}/ | sed -e 's|/\+|/|g')"
local full_source="$(trim_path ${backing}/${source})"
local full_dest="$(trim_path ${rootmnt}/${dest})"
device_used="yes"
if echo ${options} | grep -qe "\<linkfiles\>";
then
Expand Down Expand Up @@ -1373,7 +1373,7 @@ do_custom_mounts ()
# FIXME: this should really be handled by
# live-config since we don't know for sure
# which uid a certain user has until then
if echo ${dest} | grep -qe "^${rootmnt}/*home/\+[^/]\+"
if trim_path ${dest} | grep -qe "^${rootmnt}/*home/[^/]\+"
then
path="/"
for dir in $(echo ${dest} | sed -e 's|/\+| |g')
Expand Down

0 comments on commit 7a8eabf

Please sign in to comment.