X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fdata.py;h=0483cd7ad54bde929aeca8f80839fad5e6fa9d87;hp=2e22c7e0e2581e6c0350f6328aa3da7044e41c64;hb=3716a4cf43e0be2811dc8aeb0603f99209c42757;hpb=0580d77ecba37ac032dde3e3d8d7b054ccc7fd74 diff --git a/mudpy/data.py b/mudpy/data.py index 2e22c7e..0483cd7 100644 --- a/mudpy/data.py +++ b/mudpy/data.py @@ -144,7 +144,7 @@ class DataFile: for candidate in os.listdir(os.path.dirname(self.filename)): if re.match( os.path.basename(self.filename) + - """\.\d+$""", candidate + r"""\.\d+$""", candidate ): backups.append(int(candidate.split(".")[-1])) backups.sort() @@ -201,10 +201,6 @@ def find_file( ): """Return an absolute file path based on configuration.""" - # make sure to get rid of any surrounding quotes first thing - if file_name: - file_name = file_name.strip("\"'") - # this is all unnecessary if it's already absolute if file_name and os.path.isabs(file_name): return os.path.realpath(file_name) @@ -218,11 +214,11 @@ def find_file( ) and "internal:storage" in universe.contents: storage = universe.categories["internal"]["storage"] if not root_path: - root_path = storage.get("root_path").strip("\"'") + root_path = storage.get("root_path") if not search_path: search_path = storage.get("search_path") if not default_dir: - default_dir = storage.get("default_dir").strip("\"'") + default_dir = storage.get("default_dir") # if there's only one file loaded, try to work around a chicken