Changeset c69425e


Ignore:
Timestamp:
10/18/13 12:37:00 (14 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
dca28eb
Parents:
04421bd
Message:

Fix a bug with the mount tray where memory disks mounted outside the tray are automatically unmounted by the tray.
TRAC Ticket: https://trac.pcbsd.org/ticket/773

Location:
src-qt4/pc-mounttray
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-mounttray/menuItem.cpp

    rb103b6c rc69425e  
    5252  //Start the automount procedure if necessary 
    5353  if(checkAutomount->isChecked() || devType=="ISO"){ 
    54     QTimer::singleShot(500,this,SLOT( slotMountClicked() )); 
     54    QTimer::singleShot(500,this,SLOT( slotAutoMount() )); 
    5555  } 
    5656  //Update the Item based upon current device status 
     
    149149  } 
    150150  updateItem(); 
     151} 
     152 
     153void MenuItem::slotAutoMount(){ 
     154//Just like slotMountClicked, but will only mount the device if appropriate (no removals); 
     155  if( isConnected() ){ 
     156    if( !isMounted() ){ 
     157      mountItem(); 
     158    } 
     159  }else{ 
     160    emit itemRemoved(device);      
     161  } 
     162  updateItem();  
    151163} 
    152164 
     
    277289  if(output.join(" ").simplified().isEmpty()){ 
    278290    //unmounting successful, remove the mount point directory 
    279     output = pcbsd::Utils::runShellCommand(cmd2); 
     291    if(mountpoint != "/mnt" && mountpoint != "/media"){ //make sure not to remove base directories 
     292      output = pcbsd::Utils::runShellCommand(cmd2); 
     293    } 
    280294    if(!output.join(" ").simplified().isEmpty()){ 
    281295      qDebug() << "pc-mounttray: Error removing mountpoint:" << mountpoint; 
  • src-qt4/pc-mounttray/menuItem.h

    r22f21be rc69425e  
    6868  private slots: 
    6969        void slotMountClicked(); 
     70        void slotAutoMount(); 
    7071        void slotAutoMountToggled(bool); 
    7172         
Note: See TracChangeset for help on using the changeset viewer.