Author: fehr Date: Thu May 26 11:46:04 2011 New Revision: 64111 URL: http://svn.opensuse.org/viewcvs/yast?rev=64111&view=rev Log: bufgixes for subvolume creation in instsys Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc?rev=64111&r1=64110&r2=64111&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc (original) +++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc Thu May 26 11:46:04 2011 @@ -398,7 +398,7 @@ int ret = 0; bool needUmount = false; Storage* st = NULL; - string m = getMount(); + string m = getStorage()->prependRoot(getMount()); if( !isMounted() ) { st = getContainer()->getStorage(); @@ -410,14 +410,23 @@ if( ret==0 ) { SystemCmd c; - string cmd = BTRFSBIN " subvolume create " + m + '/'; + string cmd = BTRFSBIN " subvolume create "; for( list<Subvolume>::iterator i=subvol.begin(); i!=subvol.end(); ++i ) { if( i->created() ) { if( !silent ) getStorage()->showInfoCb( createSubvolText(true,i->path())); - c.execute( cmd + i->path() ); + y2mil( "dir:" << m << " path:" << i->path() ); + string path = m + "/" + i->path(); + string dir = path.substr( 0, path.find_last_of( "/" ) ); + y2mil( "path:" << path << " dir:" << dir ); + if( !checkDir( dir ) ) + { + y2mil( "create path:" << dir ); + createPath( dir ); + } + c.execute( cmd + path ); if( c.retcode()==0 ) i->setCreated(false); else -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org