From d6e2106e96b6969e045251d972e1adcceb9728df Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Tue, 5 Jul 2022 15:34:08 +0200 Subject: Cleanup: move filename_sane & canonicalize_path functions to libutil Signed-off-by: David Oberhollenzer --- include/fstree.h | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'include/fstree.h') diff --git a/include/fstree.h b/include/fstree.h index 3fb4f47..7bdbddf 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -236,25 +236,6 @@ tree_node_t *fstree_get_node_by_path(fstree_t *fs, tree_node_t *root, const char *path, bool create_implicitly, bool stop_at_parent); -/* - Convert back to forward slashed, remove all preceeding and trailing slashes, - collapse all sequences of slashes, remove all path components that are '.' - and returns failure state if one of the path components is '..'. - - Returns 0 on success. -*/ -int canonicalize_name(char *filename); - -/* - Returns true if a given filename is sane, false if it is not (e.g. contains - slashes or it is equal to '.' or '..'). - - If check_os_specific is true, this also checks if the filename contains - a character, or is equal to a name, that is black listed on the current OS. - E.g. on Windows, a file named "COM0" or "AUX" is a no-no. - */ -bool is_filename_sane(const char *name, bool check_os_specific); - /* Add a hard link node. Returns NULL on failure and sets errno. */ -- cgit v1.2.3