diff --git a/.cspell/words.txt b/.cspell/words.txt index aac39b51..36b72a33 100644 --- a/.cspell/words.txt +++ b/.cspell/words.txt @@ -248,4 +248,4 @@ wsign-conversion wunused wuseless wxwidgets_version -xattr \ No newline at end of file +xattr diff --git a/CHANGELOG.md b/CHANGELOG.md index da223299..57897ff5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Changes from v2.0.6-release * Fixed `.` and `..` incorrectly being reported as files in remote Linux mounts +* Fixed UI mount failure when path contains a space ## v2.0.6-release diff --git a/repertory.iss.in b/repertory.iss.in index b6175feb..1f425ed4 100644 --- a/repertory.iss.in +++ b/repertory.iss.in @@ -32,16 +32,18 @@ WizardStyle=modern function CheckAddPath(Param: string): boolean; var CurPath: string; + PathPos: Integer; begin - if not RegQueryStringValue(HKEY_LOCAL_MACHINE, + if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', - 'Path', CurPath) + 'PATH', CurPath) then begin - Result := True; + PathPos := Pos(';' + Param + ';', ';' + CurPath + ';'); + Result := PathPos = 0; exit; end; - Result := Pos(';' + Param + ';', ';' + CurPath + ';') = 0; + Result := True; end; [Languages] @@ -66,4 +68,4 @@ Filename: "msiexec.exe"; WorkingDir: "{app}"; Parameters: "/a winfsp-@WINFSP_VER [Registry] Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \ ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app};"; \ - Check: CheckAddPath('{app}') + Check: CheckAddPath(ExpandConstant('{app}'))