From 60ac6a82c0021396423083444517a1d78938db72 Mon Sep 17 00:00:00 2001 From: Fred Hamster Date: Thu, 24 Apr 2025 14:54:11 -0400 Subject: [PATCH] more progress --- scripts/files/filename_helper.py | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) 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. -- 2.34.1