Skip to content

Commit

Permalink
Make config and stylesheet files non-executable
Browse files Browse the repository at this point in the history
There is no need to have the executable bit on for the config and
stylesheet files as they are not run by themselves.
  • Loading branch information
terop committed Aug 12, 2024
1 parent de8fc94 commit 1d3f804
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions safeeyes/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def initialize_safeeyes():

# Copy the safeeyes.json
shutil.copy2(SYSTEM_CONFIG_FILE_PATH, CONFIG_FILE_PATH)
os.chmod(CONFIG_FILE_PATH, 0o777)
os.chmod(CONFIG_FILE_PATH, 0o666)

create_user_stylesheet_if_missing()

Expand All @@ -385,7 +385,7 @@ def create_user_stylesheet_if_missing():
# Copy the new style sheet
if not os.path.isfile(STYLE_SHEET_PATH):
shutil.copy2(SYSTEM_STYLE_SHEET_PATH, STYLE_SHEET_PATH)
os.chmod(STYLE_SHEET_PATH, 0o777)
os.chmod(STYLE_SHEET_PATH, 0o666)

def create_startup_entry(force=False):
"""
Expand Down Expand Up @@ -493,8 +493,8 @@ def reset_config():
shutil.copy2(SYSTEM_STYLE_SHEET_PATH, STYLE_SHEET_PATH)

# Add write permission (e.g. if original file was stored in /nix/store)
os.chmod(CONFIG_FILE_PATH, 0o777)
os.chmod(STYLE_SHEET_PATH, 0o777)
os.chmod(CONFIG_FILE_PATH, 0o666)
os.chmod(STYLE_SHEET_PATH, 0o666)

create_startup_entry()

Expand All @@ -505,7 +505,7 @@ def replace_style_sheet():
"""
delete(STYLE_SHEET_PATH)
shutil.copy2(SYSTEM_STYLE_SHEET_PATH, STYLE_SHEET_PATH)
os.chmod(STYLE_SHEET_PATH, 0o777)
os.chmod(STYLE_SHEET_PATH, 0o666)


def initialize_logging(debug):
Expand Down

0 comments on commit 1d3f804

Please sign in to comment.