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] RPCS3 replaces file hardlinks with regular files. #16255

Open
Daviteusz opened this issue Oct 27, 2024 · 7 comments
Open

[Bug] RPCS3 replaces file hardlinks with regular files. #16255

Daviteusz opened this issue Oct 27, 2024 · 7 comments

Comments

@Daviteusz
Copy link

Daviteusz commented Oct 27, 2024

Quick summary

RPCS3 replaces file hardlinks with regular files.

Details

RPCS3 is overwriting hardlinks of files that were created before launching RPCS3, and even after RPCS3 has launched once and saved data to files like config.yml or similar.

For this reason, using the Scoop package manager becomes challenging, as the data preservation feature, intended to keep important files even after uninstalling RPCS3, does not work fully.

Info about how to install RPCS3 via scoop.

save attached file as rpcs3.json, and use scoop install .\rpcs3.json to install RPCS3 and test.

https://scoop.sh/ - to install scoop package manager

{
    "version": "0.0.33-17065",
    "description": "Sony PlayStation 3 emulator",
    "homepage": "https://rpcs3.net/",
    "license": {
        "identifier": "GPL-2.0",
        "url": "https://github.com/RPCS3/rpcs3/blob/master/LICENSE"
    },
    "notes": [
        "ATTENTION: RPCS3 requires a copy of the official PS3 firmware to function.",
        "Install the ps3-system-software package.  You must still manually load PS3UPDAT.PUP",
        "See the official quickstart guide for further instructions: https://rpcs3.net/quickstart",
        ""
    ],
    "suggest": {
        "Microsoft Visual C++ Runtime 2022": "extras/vcredist2022",
        "PS3 Firmware": "emulators/ps3-system-software"
    },
    "url": "https://github.com/rpcs3/rpcs3-binaries-win/releases/download/build-431221f1725577d1eba6fe439ed1f2cdc4c09600/rpcs3-v0.0.33-17065-431221f1_win64.7z",
    "hash": "46a4eaa80575352166a0cb412fb58be92b46c59a579fd1e80e8067cc3557f5df",
    "pre_install": [
        "if (!(Test-Path \"$persist_dir\")) {",
            "echo ''",
            "echo ''",
            "echo 'Note: During fresh installation, launching RPCS3.exe in the background is required to create additional files that the script will move to the Persist directory.'",
            "echo ''",
            "Start-Sleep -Seconds 8",
            "echo 'Starting RPCS3.exe within 10 sec...'",
            "echo '(Ctrl + C to Abort)...'",
            "Start-Sleep -Seconds 10",
            "echo ''",
            "Start-Process \"$dir\\rpcs3.exe\"  -WindowStyle Hidden -PassThru | Out-Null",
            "Start-Sleep -Seconds 5",
            "Stop-Process -Name rpcs3 -Force",
            "'[Meta]', 'checkUpdateStart=false' | Set-Content \"$dir\\GuiConfigs\\CurrentSettings.ini\"",
        "}"
    ],
    "post_install": [
        "if (!(Test-Path \"$persist_dir\")) {",
            "Get-ChildItem -Path \"$dir\" -Filter '*.original' -Directory | ForEach-Object { Remove-Item -Recurse $_.FullName }",
        "}"
    ],
    "bin": "rpcs3.exe",
    "shortcuts": [
        [
            "rpcs3.exe",
            "Sony PlayStation 3 [ps3][rpcs3]"
        ]
    ],
    "persist": [
        "dev_flash",
        "dev_flash2",
        "dev_flash3",
        "dev_hdd0",
        "dev_hdd1",
        "dev_usb000",
        "cache",
        "captures",
        "config.yml",
        "config",
        "firmware",
        "games.yml",
        "GuiConfigs",
        "Icons",
        "patches"
    ],
    "checkver": {
        "url": "https://rpcs3.net/compatibility?b",
        "regex": "/rpcs3-binaries-win/releases/download/build-(?<fullhash>[0-9a-f]+)/rpcs3-v(?<build>[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+)-(?<shorthash>[0-9a-f]{8})",
        "replace": "${build}"
    },
    "autoupdate": {
        "url": "https://github.com/rpcs3/rpcs3-binaries-win/releases/download/build-$matchFullhash/rpcs3-v$matchBuild-$matchShorthash_win64.7z",
        "hash": {
            "url": "https://rpcs3.net/compatibility?b",
            "regex": "Windows SHA-256: ($sha256)"
        }
    }
}

Attach a log file

Not required

Attach capture files for visual issues

No response

System configuration

Windows 11 24h2

Other details

No response

@elad335
Copy link
Contributor

elad335 commented Oct 28, 2024

Test #16256

@Daviteusz
Copy link
Author

I tried to build, but VSCode stubbornly insists that I don’t have Visual Studio 2022, even though it’s installed along with build tools. 🤔

@elad335
Copy link
Contributor

elad335 commented Oct 29, 2024

Retest on master

@Daviteusz
Copy link
Author

Daviteusz commented Oct 31, 2024

Sorry for the late reply. Has this change been added to the new RPCS3 version?

I updated RPCS3 to the latest version, but the issue persists.

Here’s what I’m doing:

The Scoop script launches RPCS3 for the first time and then closes it. It creates hard links for config.yml and CurrentSettings.ini in another folder outside the RPCS3 directory.

On the second launch of RPCS3 or after making changes to its settings, the files in the RPCS3 folder are deleted, and new files are created. During this process, these files lose their (hard)links to the files located in the different directory.

To test this without installing scoop, just create a hard link of the config.yml file to another location from the terminal:

mkdir C:\RPCS3_data
cmd /c mklink /H "C:\RPCS3_data\config.yml" "C:\RPCS3\config.yml"

To test hardlink:

fsutil hardlink list C:\RPCS3\config.yml

Change some settings in RPCS3, then run the same command above

@elad335
Copy link
Contributor

elad335 commented Oct 31, 2024

Test #16269

@elad335
Copy link
Contributor

elad335 commented Nov 1, 2024

Retest on latest build

@Daviteusz
Copy link
Author

2024-11-01.19-21-50.mp4

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

2 participants