Checking the unzip result

preferencesAboutTextFull
unknown 14 years ago
parent b5c83d2197
commit 2025c86a57
  1. 8
      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);
if(!documentRootFolder.length()){
UBApplication::showMessage(tr("Import of file %1 failed.").arg(fi.baseName()));
return 0;
}
else{
UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder); UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder);
UBApplication::showMessage(tr("Import successful.")); UBApplication::showMessage(tr("Import successful."));
return newDocument; return newDocument;
}
} }

Loading…
Cancel
Save