Ignore:
Timestamp:
03/05/14 09:17:14 (17 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
0debaa77
Parents:
109c737
Message:

Fix a bug in the Life-preserver GUI where if the parent/containing directory for a reversion is missing it would fail. Now it will automatically re-create the parent directory heirarchy as necessary when doing a restore.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/life-preserver/lp-gui/LPGUtils.cpp

    r109c737 r65e10ad5  
    165165  if( !nDir.exists() ){ 
    166166    //Create the new Directory 
     167    qDebug() << "Re-Create parent directory structure:" << newPath; 
    167168    nDir.cdUp(); 
    168     ok = nDir.mkdir(newPath.section("/",-1)); 
     169    ok = nDir.mkpath(newPath.section("/",-1)); //also create all parent directories if necessary 
    169170    if(ok){  
     171      qDebug() << " - Reset permissions on the main parent dir to match snapshot"; 
    170172      nDir.cd(newPath.section("/",-1));  
    171173      QFile::setPermissions(newPath, QFile::permissions(oldPath)); //make sure the new dir has the old permissions 
Note: See TracChangeset for help on using the changeset viewer.