From: Fred Hamster Date: Thu, 24 Apr 2025 18:54:11 +0000 (-0400) Subject: more progress X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=60ac6a82c0021396423083444517a1d78938db72;p=feisty_meow.git more progress --- diff --git a/scripts/files/filename_helper.py b/scripts/files/filename_helper.py index add19121..aa97bc92 100644 --- a/scripts/files/filename_helper.py +++ b/scripts/files/filename_helper.py @@ -211,26 +211,23 @@ def directory_separator() -> str: # these mutate the directory slashes in a directory name. -#hmmm: unconverted below here--monsters !!! # the one we use most frequently; it uses the unix slash. -sub canonicalize { - return &canonicalizer(@_, "/"); -} +def canonicalize(pathname: str): + return canonicalizer(pathname, '/') # one that turns names into the style native on the current platform. -sub native_canonicalize { - return &canonicalizer(@_, &directory_separator()); -} +def native_canonicalize(pathname: str): + return canonicalizer(pathname, &directory_separator()) # one that explicitly uses pc style back-slashes. -sub pc_canonicalize { - return &canonicalizer(@_, "\\"); -} +def pc_canonicalize(pathname: str): + return canonicalizer(pathname, '\\') # one that explicitly does unix style forward slashes. -sub unix_canonicalize { - return &canonicalizer(@_, "/"); -} +def unix_canonicalize(pathname: str): + return canonicalizer(pathname, '/') + +#hmmm: unconverted below here--monsters !!! # this more general routine gets a directory separator passed in. it then # replaces all the separators with that one.