Skip to content

Commit

Permalink
handle subvolumes with not starting with default_subvol better
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Fehr committed May 7, 2013
1 parent 9c18abe commit 602ad3e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/modules/AutoinstPartPlan.ycp
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,14 @@
string defsub = "";
if( !isempty(FileSystems::default_subvol) )
defsub = FileSystems::default_subvol + "/";
new_pe["subvolumes"] = maplist( map p, (list<map>)pe["subvol"]:[],
``({return( substring(p["name"]:"",size(defsub)));}));
new_pe["subvolumes"] =
maplist( map p, (list<map>)pe["subvol"]:[], ``(
{
if( size(defsub)>0 && substring(p["name"]:"",0,size(defsub))==defsub )
return( substring(p["name"]:"",size(defsub)));
else
return( p["name"]:"" );
}));
new_pe["subvolumes"] = filter( string s, new_pe["subvolumes"]:[], ``(!isempty(s)));
}

Expand Down

0 comments on commit 602ad3e

Please sign in to comment.