Skip to content

Commit

Permalink
This should (hopefully) be cross-platform compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-l-kong committed Jul 21, 2023
1 parent 5e48e38 commit 4d9bfe1
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/toffy/fov_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,14 +363,8 @@ def _check_bin_updates(self):
# if .bin file ctime > .json file ctime, incomplete extraction, need to re-extract
# NOTE: creation time access is different on Windows/Linux vs MacOS
print("Testing the extraction process on the following OS: %s" % platform.system())
if platform.system() in ["Windows", "Linux"]:
fov_bin_create = Path(fov_bin_path).stat().st_ctime
fov_json_create = Path(fov_json_path).stat().st_ctime
print("The creation time of .bin create: %.2f" % fov_bin_create)
print("The creation time of .json create: %.2f" % fov_json_create)
else:
fov_bin_create = os.stat(fov_bin_path).st_ctime
fov_json_create = os.stat(fov_json_path).st_ctime
fov_bin_create = Path(fov_bin_path).stat().st_ctime
fov_json_create = Path(fov_json_path).stat().st_ctime

if fov_bin_create > fov_json_create:
print(f"Re-extracting incompletely extracted FOV {fov}")
Expand Down

0 comments on commit 4d9bfe1

Please sign in to comment.