src/hbservers/hbsplashgenerator/hbsplashdirs_p.h
changeset 5 627c4a0fd0e7
parent 1 f7ac710697a9
child 21 4633027730f5
child 34 ed14f46c0e55
equal deleted inserted replaced
3:11d3954df52a 5:627c4a0fd0e7
    39     QString path("c:/private/2002E68B");
    39     QString path("c:/private/2002E68B");
    40     TInt driveType = DriveInfo::EDefaultMassStorage;
    40     TInt driveType = DriveInfo::EDefaultMassStorage;
    41     TInt drive;
    41     TInt drive;
    42     TChar driveLetter;
    42     TChar driveLetter;
    43     if (DriveInfo::GetDefaultDrive(driveType, drive) == KErrNone
    43     if (DriveInfo::GetDefaultDrive(driveType, drive) == KErrNone
    44         && DriveInfo::GetDefaultDrive(driveType, driveLetter) == KErrNone)
    44             && DriveInfo::GetDefaultDrive(driveType, driveLetter) == KErrNone) {
    45     {
       
    46         bool driveUsable = true;
    45         bool driveUsable = true;
    47         CCoeEnv *env = CCoeEnv::Static();
    46         CCoeEnv *env = CCoeEnv::Static();
    48         if (env) {
    47         if (env) {
    49             TUint driveStatus;
    48             TUint driveStatus;
    50             qDebug("[hbsplash] dir selection: trying drive %d %c", drive, (char) driveLetter);
    49             qDebug("[hbsplash] dir selection: trying drive %d %c", drive, (char) driveLetter);
    51             if (DriveInfo::GetDriveStatus(env->FsSession(), drive, driveStatus) == KErrNone) {
    50             if (DriveInfo::GetDriveStatus(env->FsSession(), drive, driveStatus) == KErrNone) {
    52                 qDebug("[hbsplash] drive status is %x", driveStatus);
    51                 qDebug("[hbsplash] drive status is %x", driveStatus);
    53                 // Check if the drive is really internal (devices without internal mass
    52                 // Check if the drive is really internal (devices without internal mass
    54                 // storage will return the memory card which is not what we want here).
    53                 // storage will return the memory card which is not what we want here).
    55                 if (!(driveStatus & DriveInfo::EDriveInternal)
    54                 if (!(driveStatus & DriveInfo::EDriveInternal)
    56                     || !(driveStatus & DriveInfo::EDrivePresent)
    55                         || !(driveStatus & DriveInfo::EDrivePresent)
    57                     || !(driveStatus & DriveInfo::EDriveFormatted)
    56                         || !(driveStatus & DriveInfo::EDriveFormatted)
    58                     || (driveStatus & DriveInfo::EDriveCorrupt)
    57                         || (driveStatus & DriveInfo::EDriveCorrupt)
    59                     || (driveStatus & DriveInfo::EDriveInUse))
    58                         || (driveStatus & DriveInfo::EDriveInUse)) {
    60                 {
       
    61                     qDebug("[hbsplash] drive not usable, skipping");
    59                     qDebug("[hbsplash] drive not usable, skipping");
    62                     driveUsable = false;
    60                     driveUsable = false;
    63                 }
    61                 }
    64             } else {
    62             } else {
    65                 qDebug("[hbsplash] GetDriveStatus failed, skipping");
    63                 qDebug("[hbsplash] GetDriveStatus failed, skipping");