Changeset 3648d1e


Ignore:
Timestamp:
04/04/14 04:43:42 (15 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
48964c7
Parents:
1a90693
Message:

Update the "ngfslabel" output parsing to skip warnings about setting the locale (Windows 8), and better detect when the utility failed completely.

File:
1 edited

Legend:

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

    r67bf73c r3648d1e  
    8383  if(filesystem.toLower()=="ntfs"){ 
    8484    //Use ntfslabel for ntfs filesystems 
    85     dlabel = pcbsd::Utils::runShellCommand("ntfslabel "+devDir.absoluteFilePath(node) ).join("").simplified(); 
     85    QStringList tmp = pcbsd::Utils::runShellCommand("ntfslabel "+devDir.absoluteFilePath(node) ); 
     86    if(tmp.length() ==1){ 
     87      dlabel = tmp[0]; //good result 
     88    }else if(tmp.length()==2 && tmp[0].startsWith("Failed ")){ 
     89      dlabel = tmp[1]; //also good result, just warning for first line (Windows 8) 
     90    } 
     91    //skip outputs if 0 or >2 lines - (errors without detected label) 
    8692  }else{ 
    8793    //All other filesystems 
Note: See TracChangeset for help on using the changeset viewer.