Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reduce verbosity of debug logging related to plugin detection
  • Loading branch information
TheAssassin committed Nov 19, 2018
commit 6f7a2fd54aebfcf85e2eb4df00b2e21c4971fcde
10 changes: 8 additions & 2 deletions src/plugin/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,22 @@ namespace linuxdeploy {

ldLog() << LD_DEBUG << "Searching for plugins in directory" << dir << std::endl;

bool extendedDebugLoggingEnabled = (getenv("DEBUG_PLUGIN_DETECTION") != nullptr);

for (bf::directory_iterator i(dir); i != bf::directory_iterator(); ++i) {
// must be a file, and not a directory
if (!(bf::is_directory(bf::absolute(*i)))) {
ldLog() << LD_DEBUG << "Entry is a directory, skipping:" << i->path() << std::endl;
if (extendedDebugLoggingEnabled)
ldLog() << LD_DEBUG << "Entry is a directory, skipping:" << i->path() << std::endl;

continue;
}

// file must be executable...
if (!(bf::status(*i).permissions() & (bf::owner_exe | bf::group_exe | bf::others_exe))) {
ldLog() << LD_DEBUG << "File/symlink is not executable, skipping:" << i->path() << std::endl;
if (extendedDebugLoggingEnabled)
ldLog() << LD_DEBUG << "File/symlink is not executable, skipping:" << i->path() << std::endl;

continue;
}

Expand Down