From ade2a7298c6bd3354e2f5324a7a4ec0afaa72588 Mon Sep 17 00:00:00 2001 From: Fred Hamster Date: Thu, 24 Apr 2025 06:15:40 -0400 Subject: [PATCH] more progress --- scripts/files/filename_helper.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/files/filename_helper.py b/scripts/files/filename_helper.py index f7655c36..add19121 100644 --- a/scripts/files/filename_helper.py +++ b/scripts/files/filename_helper.py @@ -199,21 +199,19 @@ def remove_trailing_slashes(pathname: str) -> str: ############################################################################ -#hmmm: unconverted below here--monsters !!! - # returns the proper directory separator for this platform. this requires # an environment variable called "OS" for non-Unix operating systems. the # valid values for that are shown below. def directory_separator() -> str: - if ( ($OS eq "Windows_NT") || ($OS eq "Windows_95") - || ($OS eq "DOS") || ($OS eq "OS2") ) { return "\\"; } - else { return "/"; } -} + if OS == "Windows_NT" or OS == "Windows_95" or OS == "DOS" or OS == "OS2": + return "\\" + return "/" ############################################################################ # 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(@_, "/"); -- 2.34.1