Skip to content

Commit

Permalink
#36 only apply only included matched, if regex is filled
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanJakobo committed Sep 26, 2023
1 parent 441cf54 commit ef44513
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/handler/fileHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ bool FileHandler::excludeFile(std::string filename)
}
}

return _invertMatch;
// if regex is not filled, always show file
return false;
}

bool FileHandler::excludeFolder(std::string folderName)
Expand All @@ -145,7 +146,8 @@ bool FileHandler::excludeFolder(std::string folderName)
}
}

return _invertMatch;
// if regex is not filled, always show folder
return false;
}

HideState FileHandler::getHideState(Itemtype itemType, std::string prefix, std::string path, std::string title = "")
Expand Down
18 changes: 18 additions & 0 deletions src/handler/fileHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,26 @@ class FileHandler
public:
FileHandler();
~FileHandler();

/**
* Determines if a file should be excluded
*
* @param filename name of the file to check
* @return bool returns true if file should be excluded, else false
*/
bool excludeFile(std::string filename);

/**
* Determines if a folder should be excluded
*
* @param foldername name of the folder to check
* @return bool returns true if folder should be excluded, else false
*/
bool excludeFolder(std::string foldername);

/**
* Returns the hide state for a given item
*/
HideState getHideState(Itemtype itemType, std::string prefixToStripe, std::string path, std::string title);

std::string getStorageLocation();
Expand Down

0 comments on commit ef44513

Please sign in to comment.