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

[Feature] Allow storing the 'persist' folder on a different drive using a symbolic link #6248

Open
chaerun opened this issue Dec 18, 2024 · 0 comments

Comments

@chaerun
Copy link
Contributor

chaerun commented Dec 18, 2024

Feature Request

I'm storing my persistent data on another drive by creating a symbolic link to the persist folder.

New-Item -ItemType SymbolicLink -Path '~\scoop\persist' -Value 'D:\persist'

When installing an application, I got this error message:

New-Item: C:\Users\Chaerun\scoop\apps\scoop\current\lib\install.ps1:1057
Line |
1057 |  …             New-Item -Path $source -ItemType HardLink -Value $target  …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The system cannot move the file to a different disk drive.

Is your feature request related to a problem? Please describe.

Scoop failed to persist data because the physical location of the persist folder is on a different drive.
This occurred because install.ps1 uses a HardLink when persisting a file

# target is a file, create hard link
New-Item -Path $source -ItemType HardLink -Value $target | Out-Null

Describe the solution you'd like

Use SymbolicLink instead of HardLink when persisting a file

# target is a file, create symbolic link
New-Item -Path $source -ItemType SymbolicLink -Value $target | Out-Null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant