Skip to content

Commit

Permalink
searchManual: look for *.man.png files on LinkApp
Browse files Browse the repository at this point in the history
  • Loading branch information
Apaczer committed Jul 16, 2024
1 parent 07bd7d1 commit 5879ff7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/linkapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const string LinkApp::searchManual() {
string filename = exec;
string::size_type pos = exec.rfind(".");
if (pos != string::npos) filename = exec.substr(0, pos);
string imagename = filename + ".man.png";
filename += ".man.txt";

string dname = dir_name(exec) + "/";
Expand All @@ -141,6 +142,7 @@ const string LinkApp::searchManual() {

if (file_exists(linktitle)) return linktitle;
if (file_exists(filename)) return filename;
if (file_exists(imagename)) return imagename;
if (file_exists(dirtitle)) return dirtitle;

return "";
Expand Down

0 comments on commit 5879ff7

Please sign in to comment.