tree-wide: rename hidden_file to hidden_or_backup_file and optimize
In standard linux parlance, "hidden" usually means that the file name starts with ".", and nothing else. Rename the function to convey what the function does better to casual readers. Stop exposing hidden_file_allow_backup which is rather ugly and rewrite hidden_file to extract the suffix first. Note that hidden_file_allow_backup excluded files with "~" at the end, which is quite confusing. Let's get rid of it before it gets used in the wrong place.
This commit is contained in:
@@ -122,7 +122,6 @@ bool path_is_safe(const char *p) _pure_;
|
||||
|
||||
char *file_in_same_dir(const char *path, const char *filename);
|
||||
|
||||
bool hidden_file_allow_backup(const char *filename);
|
||||
bool hidden_file(const char *filename) _pure_;
|
||||
bool hidden_or_backup_file(const char *filename) _pure_;
|
||||
|
||||
bool is_device_path(const char *path);
|
||||
|
||||
Reference in New Issue
Block a user