filemanager/src/filemanager/src/operationservice/fmoperationresultprocesser.cpp
changeset 29 b3155376f2b4
parent 24 1d0c87b42e2e
child 30 6e96d2143d46
equal deleted inserted replaced
24:1d0c87b42e2e 29:b3155376f2b4
    47     QString value;   
    47     QString value;   
    48     QFileInfo fileInfo(srcFile);
    48     QFileInfo fileInfo(srcFile);
    49     bool ret = FmDlgUtils::showTextQuery( questionText, value, true, maxFileNameLength, QString(), false );
    49     bool ret = FmDlgUtils::showTextQuery( questionText, value, true, maxFileNameLength, QString(), false );
    50     while ( ret ) {
    50     while ( ret ) {
    51         bool checkResult = true;
    51         bool checkResult = true;
       
    52         // remove whitespace from the start and the end.
       
    53         value = value.trimmed();
    52         QString newTargetPath = FmUtils::fillPathWithSplash(
    54         QString newTargetPath = FmUtils::fillPathWithSplash(
    53                                 fileInfo.absolutePath() ) + value;
    55                                 fileInfo.absolutePath() ) + value;
    54         QFileInfo newFileInfo( newTargetPath );
    56         QFileInfo newFileInfo( newTargetPath );
    55         if (!FmUtils::checkFolderFileName(value)) {
    57         if (!FmUtils::checkFolderFileName(value)) {
    56             FmDlgUtils::information( hbTrId( "Invalid file or folder name, try again!" ) );
    58             FmDlgUtils::information( hbTrId( "Invalid file or folder name, try again!" ) );