Skip to content

Commit

Permalink
Use Appdata config path when mounting
Browse files Browse the repository at this point in the history
  • Loading branch information
foodprocessor committed Nov 30, 2023
1 parent 523c2f6 commit 0d3a111
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gui/mountPrimaryWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def mountBucket(self):
except ValueError as e:
self.addOutputText(f"Invalid mount path: {str(e)}")
return

configPath = os.path.join(widgetFuncs.getCurrentDir(self), 'config.yaml')

if platform == "win32":
# Windows mount has a quirk where the folder shouldn't exist yet,
# add CloudFuse at the end of the directory
Expand All @@ -159,7 +160,7 @@ def mountBucket(self):
# don't mount, since we failed to install the service
return

(stdOut, stdErr, exitCode, executableFound) = self.runCommand(f"cloudfuse.exe service mount {directory} --config-file=config.yaml".split())
(stdOut, stdErr, exitCode, executableFound) = self.runCommand(f"cloudfuse.exe service mount {directory} --config-file={configPath}".split())
if not executableFound:
self.addOutputText("cloudfuse.exe not found! Is it installed?")
self.errorMessageBox("Error running cloudfuse CLI - Please re-install Cloudfuse.")
Expand All @@ -183,7 +184,7 @@ def mountBucket(self):

self.addOutputText("Successfully mounted container")
else:
(stdOut, stdErr, exitCode, executableFound) = self.runCommand(f"./cloudfuse mount {directory} --config-file=./config.yaml".split())
(stdOut, stdErr, exitCode, executableFound) = self.runCommand(f"./cloudfuse mount {directory} --config-file={configPath}".split())
if exitCode != 0:
self.addOutputText(f"Error mounting container: {stdErr}")
self.errorMessageBox(f"Error mounting container - check the settings and try again\n{stdErr}")
Expand Down

0 comments on commit 0d3a111

Please sign in to comment.