Skip to content

Commit

Permalink
Ensure goofys credentials filepath is a pathlib Path
Browse files Browse the repository at this point in the history
  • Loading branch information
mharvilla committed Jan 29, 2024
1 parent 5c82a2e commit b0ffef7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cli/initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def initialize():
new_permissions = current_permissions | stat.S_IXUSR
os.chmod(file_to_check, new_permissions)

os.makedirs(Config.GOOFYS_CREDENTIALS_FILE.parent, exist_ok=True)
with open(Config.GOOFYS_CREDENTIALS_FILE, 'a'):
os.utime(Config.GOOFYS_CREDENTIALS_FILE, None)
goofys_credentials_filepath = Path(Config.GOOFYS_CREDENTIALS_FILE)
os.makedirs(goofys_credentials_filepath.parent, exist_ok=True)
with open(goofys_credentials_filepath, 'a'):
os.utime(goofys_credentials_filepath, None)

0 comments on commit b0ffef7

Please sign in to comment.