From 65b1735c18dd385c3b04903fd303936331f9ae8a Mon Sep 17 00:00:00 2001 From: JoshuaMK Date: Sun, 6 Dec 2020 02:01:40 -0600 Subject: [PATCH] :construction: fix import bug --- fileutils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fileutils.py b/fileutils.py index cd087b5..ddd29fc 100644 --- a/fileutils.py +++ b/fileutils.py @@ -1,9 +1,11 @@ import struct import sys +from os import getenv from pathlib import Path from tools import align_byte_size, get_alignment + def resource_path(relative_path: str = "") -> Path: """ Get absolute path to resource, works for dev and for cx_freeze """ if getattr(sys, "frozen", False): @@ -17,7 +19,7 @@ def resource_path(relative_path: str = "") -> Path: def get_program_folder(folder: str = "") -> Path: """ Get path to appdata """ if sys.platform == "win32": - datapath = Path(os.getenv("APPDATA")) / folder + datapath = Path(getenv("APPDATA")) / folder elif sys.platform == "darwin": if folder: folder = "." + folder