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);
UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder);
UBApplication::showMessage(tr("Import successful."));
return newDocument;
if(!documentRootFolder.length()){
UBApplication::showMessage(tr("Import of file %1 failed.").arg(fi.baseName()));
return 0;
}
else{
UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder);
UBApplication::showMessage(tr("Import successful."));
return newDocument;
}
}

Loading…
Cancel
Save