Skip to content

Create module zip if it's not already created when syncing#1842

Merged
vadi2 merged 1 commit intoMudlet:developmentfrom
vadi2:fix-missing-module-crash
Jul 23, 2018
Merged

Create module zip if it's not already created when syncing#1842
vadi2 merged 1 commit intoMudlet:developmentfrom
vadi2:fix-missing-module-crash

Conversation

@vadi2
Copy link
Copy Markdown
Member

@vadi2 vadi2 commented Jul 23, 2018

Brief overview of PR changes/additions

Create module zip if it's not already created when syncing - this fixes a crash in the case that the original zip is no longer present.

Motivation for adding to Mudlet

Fix #1834

Other info (issues closed, discussion etc)

@vadi2 vadi2 requested a review from a team as a code owner July 23, 2018 05:59
@vadi2 vadi2 requested a review from a team July 23, 2018 05:59
filename_xml = mudlet::getMudletPath(mudlet::profilePackagePathFileName, mHostName, moduleName);
int err;
zipFile = zip_open(entry[0].toStdString().c_str(), 0, &err);
zipFile = zip_open(entry[0].toStdString().c_str(), ZIP_CREATE, &err);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zip_open was added to libzip version 1.0 - and I notice that there does not appear to be any version checking code to handle admittedly obsolete now 0.1x versions - do we have a precise minimum libzip version number on record anywhere - and, if so, what is it {remembering that the last working libzip that can be compiled without CMake is 1.3.0 - which has relevance for qmake powered builds on Windows}?

N.B. Should this command fail I do not see any checks being made for zipfile being a NULL (it is a C library so does nullptr still work in them?).

Also, I think toStdString().c_str() uses an implicit UTF-8 conversion - does this work on non-ASCII path/filenames on Windows builds? I guess we'll find out eventually...

@keneanung
Copy link
Copy Markdown
Member

We are using libzip versions above 1.0 on all supported platforms now. I don't think we have a document detailing the dependencies at all, let alone versions.

remembering that the last working libzip that can be compiled without CMake is 1.3.0 - which has relevance for qmake powered builds on Windows

This is not relevant for Windows builds. There are other dependencies that are built with cmake and the SDK installs cmake as well.

@vadi2 vadi2 merged commit 2b5262e into Mudlet:development Jul 23, 2018
@vadi2 vadi2 deleted the fix-missing-module-crash branch July 23, 2018 11:04
SlySven added a commit to SlySven/Mudlet that referenced this pull request Aug 2, 2018
# By Vadim Peretokin (81) and others
* development: (162 commits)
  BugFix: set Server Encoding correctly on auto-loading profiles
  Install xz-utils to guarantee xz is available
  Create and upload source tarballs on release
  BugFix: use Alternative OpenSSLBinary for Windows (Mudlet#1850)
  Fix auto-save kicking in and blocking save profile as
  Upgrade a few classes to newer Qt connect style (Mudlet#1846)
  Fix package exporter to work with async save (Mudlet#1832)
  Pulled out actions into a mudlet member class variables (Mudlet#1839)
  Create module zip if it's not already created when syncing (Mudlet#1842)
  i18n-ise GUI label creation (Mudlet#1838)
  Align "no map"message in centre propely (Mudlet#1837)
  New Crowdin translations (Mudlet#1756)
  Delete old version checks (Mudlet#1833)
  Re-set dev.
  3.11.1 bugfix release.
  Fix iterator to actually iterate
  BugFix: fix faulty log options for new profiles or old profile save files
  Big5 support (Mudlet#1808)
  BugFix: include a fail-back icon for the auto-saved profile in Con. Dialog
  Back to development we go!
  ...

Conflicts resolved in:
* src/TTextEdit.cpp
* src/TTextEdit.h

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
SlySven added a commit to SlySven/Mudlet that referenced this pull request Jun 22, 2020
# By Vadim Peretokin (24) and others
# Via keneanung
* development: (52 commits)
  Install xz-utils to guarantee xz is available
  Create and upload source tarballs on release
  BugFix: use Alternative OpenSSLBinary for Windows (Mudlet#1850)
  Fix auto-save kicking in and blocking save profile as
  Upgrade a few classes to newer Qt connect style (Mudlet#1846)
  Fix package exporter to work with async save (Mudlet#1832)
  Pulled out actions into a mudlet member class variables (Mudlet#1839)
  Create module zip if it's not already created when syncing (Mudlet#1842)
  i18n-ise GUI label creation (Mudlet#1838)
  Align "no map"message in centre propely (Mudlet#1837)
  New Crowdin translations (Mudlet#1756)
  Delete old version checks (Mudlet#1833)
  Re-set dev.
  3.11.1 bugfix release.
  Fix iterator to actually iterate
  BugFix: fix faulty log options for new profiles or old profile save files
  Big5 support (Mudlet#1808)
  BugFix: include a fail-back icon for the auto-saved profile in Con. Dialog
  Back to development we go!
  3.11.0 release
  ...

Conflicts resolved in:
* src/dlgProfilePreferences.cpp
* src/mudlet.qrc

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save crashing related to module manager

3 participants