Skip to content

Commit

Permalink
Use 'exec' to replace shell PID with OneDrive PID - #49
Browse files Browse the repository at this point in the history
  • Loading branch information
bpozdena committed Aug 5, 2022
1 parent 472aa50 commit 8296c4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/OneDriveGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ def __init__(self, profile, options=""):
self.config_dir = re.search(r"(.+)/.+$", self.config_file)
logging.debug(f"[GUI] OneDrive config file: {self.config_file}")
logging.debug(f"[GUI] OneDrive config dir: {self.config_dir}")
self._command = f"onedrive --confdir='{self.config_dir.group(1)}' --monitor -v {options}"
self._command = f"exec onedrive --confdir='{self.config_dir.group(1)}' --monitor -v {options}"
logging.debug(f"[GUI] Monitoring command: '{self._command}'")
self.profile_name = profile

Expand Down Expand Up @@ -1809,8 +1809,8 @@ def enable_save_button(self):
def get_response_url(self, response_url, config_dir, profile):
# Get response URL from OneDrive OAuth2
if "nativeclient?code=" in response_url:
logging.info(f'onedrive --confdir="{config_dir}" --auth-response "{response_url}"')
os.system(f'onedrive --confdir="{config_dir}" --auth-response "{response_url}"')
logging.info(f'exec onedrive --confdir="{config_dir}" --auth-response "{response_url}"')
os.system(f'exec onedrive --confdir="{config_dir}" --auth-response "{response_url}"')
logging.info("Login performed")
if APPIMAGE:
self.window2.hide()
Expand Down

0 comments on commit 8296c4c

Please sign in to comment.