Skip to content

Commit

Permalink
Only validate plugin headers
Browse files Browse the repository at this point in the history
Validating the whole plugin can be orders of magnitude slower,
libloadorder only uses the headers, and if the header is valid it's
probably good enough. This requires libespm v2.4.
  • Loading branch information
Ortham committed Nov 29, 2015
1 parent 25f4606 commit 4cc5a5f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ install:
# Currently inside the cloned repo path.
- cd ..
# Install libespm.
- wget https://github.com/WrinklyNinja/libespm/archive/2.2.0.tar.gz -O - | tar -xz
- mv libespm-2.2.0 libespm
- wget https://github.com/WrinklyNinja/libespm/archive/2.4.0.tar.gz -O - | tar -xz
- mv libespm-2.4.0 libespm
# Install Google Test
- wget https://github.com/google/googletest/archive/release-1.7.0.tar.gz -O - | tar -xz
- cd googletest-release-1.7.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Instructions for other platforms are not provided, but the process for building

* [Boost](http://www.boost.org) Filesystem and Locale libraries: tested with v1.55.0 and v1.59.0.
* [Google Test](https://github.com/google/googletest): Required to build libloadorder's tests, but not the library itself. Tested with v1.7.0.
* [Libespm](http://github.com/WrinklyNinja/libespm) v2.2.0
* [Libespm](http://github.com/WrinklyNinja/libespm) v2.4.0

### Windows

Expand Down
4 changes: 2 additions & 2 deletions src/backend/Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ namespace liblo {
bool Plugin::isValid(const std::string& filename, const GameSettings& gameSettings) {
string name = trimGhostExtension(filename);

return libespm::Plugin::isValid(gameSettings.getPluginsFolder() / name, gameSettings.getLibespmId())
|| libespm::Plugin::isValid(gameSettings.getPluginsFolder() / (name + ".ghost"), gameSettings.getLibespmId());
return libespm::Plugin::isValid(gameSettings.getPluginsFolder() / name, gameSettings.getLibespmId(), true)
|| libespm::Plugin::isValid(gameSettings.getPluginsFolder() / (name + ".ghost"), gameSettings.getLibespmId(), true);
}

std::string Plugin::trimGhostExtension(const std::string& filename) {
Expand Down

0 comments on commit 4cc5a5f

Please sign in to comment.