Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Missing folders after installing packages making applications behave incorrectly #6011

Open
otavio-silva opened this issue Jun 11, 2024 · 4 comments
Labels

Comments

@otavio-silva
Copy link

Bug Report

There's possibly an issue with Scoop installation process extracting from .exe installer files. As reported in here and later figuring out in the discussion, for some reason installing the tor-browser package there's a folder missing (Browser\browser) that causes the error I experienced.

Current Behavior

After installing the extras/tor-browser, there's a folder missing that causes the app to not behave correctly. When installing the application downloading it manually, either through the installer or extracting using 7-zip, the issue does not occur. Copying the missing folder also seems to fix the issue.

Expected Behavior

Tor Browser should open and execute normally.

Additional context/output

I think it's important to note that the issue appearing coincides with Scoop updating to version 0.4.2 and tor-browser updating to 13.0.15, as noted by someone in the discussion.

Possible Solution

It's only a wild guess, but maybe there's something up with having one folder inside another with the same name only differing by the first letter being uppercase or not?

System details

Windows version: 11 Pro 23H2

OS architecture: 64bit

PowerShell version: system is 5.1.22621.3672 and Microsoft store version is 7.4.2

Additional software: 7-zip is 24.06, git is 2.45.2

Scoop Configuration

{
  "last_update": "2024-06-11T19:15:24.7094978-03:00",
  "aria2-warning-enabled": false,
  "aria2-disabled": true,
  "scoop_repo": "https://github.com/ScoopInstaller/Scoop",
  "scoop_branch": "master"
}
@HUMORCE
Copy link
Member

HUMORCE commented Jul 26, 2024

Caused by #5945

@otavio-silva
Copy link
Author

Caused by #5945

Was this pull request merged before the latest release? I can still reproduce it.

@KevinStaude
Copy link

Caused by #5945

Was this pull request merged before the latest release? I can still reproduce it.

Same.

@o-l-a-v
Copy link

o-l-a-v commented Aug 6, 2024

I've done some testing. Scoop is hard to debug IMO. I think it must be one of these two lines, most likely Robocopy which movedir uses:

  • Scoop/lib/decompress.ps1

    Lines 125 to 127 in 859d1db

    movedir "$DestinationPath\$ExtractDir" $DestinationPath | Out-Null
    # Remove temporary directory
    Remove-Item "$DestinationPath\$($ExtractDir -replace '[\\/].*')" -Recurse -Force -ErrorAction Ignore

Edit: When testing locally by downloading the EXE manually and extract it with 7-Zip, then with robocopy.exe "C:\Users\olavb\Desktop\Te\out\Browser" "C:\Users\olavb\Desktop\Te\out" /e /move to move files one level up, the "browser" directory get's renamed to "Browser" (capital B), which Scoop then deletes as it's the same name as the temp directory.

image

Windows file system and PowerShell are as we all know case insensitive, so maybe the changing of case isn't the problem here. Rather that a folder inside $extractDir has the exact same name.


Commenting out this:

And Tor gets installed successfully.


  • Long term solution: Change Scoop installer logic to expand archive to a temp path, then move content to final install path.
  • Short term: Only delete $extractDir if it's empty.

@otavio-silva otavio-silva changed the title [Bug] Missing folders after installing packages making application behaviour incorrectly [Bug] Missing folders after installing packages making applications behave incorrectly Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants