Checking the unzip result

preferencesAboutTextFull
unknown 14 years ago
parent b5c83d2197
commit 2025c86a57
  1. 14
      src/adaptors/UBImportDocument.cpp

@ -175,11 +175,15 @@ UBDocumentProxy* UBImportDocument::importFile(const QFile& pFile, const QString&
QString documentRootFolder = expandFileToDir(pFile, path); QString documentRootFolder = expandFileToDir(pFile, path);
UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder); if(!documentRootFolder.length()){
UBApplication::showMessage(tr("Import of file %1 failed.").arg(fi.baseName()));
UBApplication::showMessage(tr("Import successful.")); return 0;
}
return newDocument; else{
UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder);
UBApplication::showMessage(tr("Import successful."));
return newDocument;
}
} }

Loading…
Cancel
Save