[PR #4225] [MERGED] steam.profile: fix rogue legacy paths and syntax #5068

Closed
opened 2026-05-05 10:31:43 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/4225
Author: @kmk3
Created: 4/30/2021
Status: Merged
Merged: 5/3/2021
Merged by: @kmk3

Base: masterHead: fix-steam-rm-roguelegacy


📝 Commits (1)

  • 691fe4c steam.profile: fix rogue legacy paths and syntax

📊 Changes

2 files changed (+18 additions, -4 deletions)

View changed files

📝 etc/inc/disable-programs.inc (+3 -1)
📝 etc/profile-m-z/steam.profile (+15 -3)

📄 Description

Due to using globbing on mkdir, the current version causes this:

@davidebeatrici commented on 2021-04-23[1]:

Error: "${HOME}/.local/share/RogueLegacy*" is an invalid filename: rejected character: "*"

Added on commit a603d4d ("steam: some more games added") / PR #4170.

The wildcard was used because Rogue Legacy apparently looks up multiple
different paths for the config and also for the data[1][2][3]:

  1. ~/.config/RogueLegacy
  2. ~/.config/RogueLegacyStorageContainer
  3. ~/.local/share/RogueLegacy
  4. ~/.local/share/RogueLegacyStorageContainer

The ones containing "RogueLegacyStorageContainer" appear to be legacy
paths (i.e.: paths which are only created by older versions of Rogue
Legacy)[2].

So replace all globs with the full paths because:

  • The paths are known a priori (unlike, say, /var/lib/libpcre*)
  • There aren't too many of them

And use only the non-legacy paths on mkdir. Besides mirroring what the
current version of Rogue Legacy does (and avoiding the creation of
unnecessary dirs), this is also done because if the following applies
(i.e.: this was not tested):

  • legacy paths take precedence over non-legacy paths
  • the first path clobbers the other ones (i.e.: rather than "merge")
  • save data exists in a non-legacy path (i.e.: path 3 in this case)
  • firejail creates all 4 paths

Then it would make the newly-created and empty path 4 clobber the
non-legacy path 3 and thus make it seem like no save files exist. This
would persist even if steam is run without firejail afterwards, as the
empty directory would still be there. Losing (or appearing to lose)
game saves can be very unfortunate, so create just the non-legacy paths
to avoid confusion.

[1] #4170 (comment)
[2] https://steamcommunity.com/app/241600/discussions/1/846957366713233279/
[3] https://www.pcgamingwiki.com/wiki/Rogue_Legacy#Game_data


Original message below (for the thread to make sense):


steam.profile: remove rogue legacy to fix syntax

Remove the mkdir with globbing, which causes this:

@davidebeatrici commented on 2021-04-23[1]:

Error: "${HOME}/.local/share/RogueLegacy*" is an invalid filename: rejected character: "*"

Added on commit bd7ad371e ("steam: also added paths to
disable-programs.inc") / PR #4170.

The wildcard was used because Rogue Legacy apparently looks up multiple
different paths for the config and also for the data[1][2][3]:

  1. ~/.config/RogueLegacy
  2. ~/.config/RogueLegacyStorageContainer
  3. ~/.local/share/RogueLegacy
  4. ~/.local/share/RogueLegacyStorageContainer

The ones containing "RogueLegacyStorageContainer" appear to be legacy
paths (i.e.: paths which are only created by older Rogue Legacy
versions)[2]. So if the following applies (i.e.: it was not tested):

  • legacy paths take precedence over non-legacy paths
  • the first path clobbers the other ones (i.e.: rather than "merge")
  • save data exists in a non-legacy path (i.e.: path 3 in this case)
  • firejail creates all 4 paths (as whitelisting requires existing paths)

Then it would make the newly-created and empty path 4 clobber the
non-legacy path 3 and thus make it seem like no save files exist. This
would persist even if steam is run without firejail afterwards, as the
empty directory would still be there. Losing (or appearing to lose)
game saves can be very unfortunate, so just ignore all the Rogue Legacy
paths for now to avoid confusion.

Note: This is a problem whenever a program supports multiple clobbering
paths and mkdir/mkfile + whitelisting is involved.

[1] https://github.com/netblue30/firejail/pull/4170#issuecomment-825405930
[2] https://steamcommunity.com/app/241600/discussions/1/846957366713233279/
[3] https://www.pcgamingwiki.com/wiki/Rogue_Legacy#Game_data


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/4225 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 4/30/2021 **Status:** ✅ Merged **Merged:** 5/3/2021 **Merged by:** [@kmk3](https://github.com/kmk3) **Base:** `master` ← **Head:** `fix-steam-rm-roguelegacy` --- ### 📝 Commits (1) - [`691fe4c`](https://github.com/netblue30/firejail/commit/691fe4cd950536bff77a250020d2853c98a4cc2b) steam.profile: fix rogue legacy paths and syntax ### 📊 Changes **2 files changed** (+18 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `etc/inc/disable-programs.inc` (+3 -1) 📝 `etc/profile-m-z/steam.profile` (+15 -3) </details> ### 📄 Description Due to using globbing on mkdir, the current version causes this: @davidebeatrici commented on 2021-04-23[1]: > ``` > Error: "${HOME}/.local/share/RogueLegacy*" is an invalid filename: rejected character: "*" > ``` Added on commit a603d4d ("steam: some more games added") / PR #4170. The wildcard was used because Rogue Legacy apparently looks up multiple different paths for the config and also for the data[1][2][3]: 1. ~/.config/RogueLegacy 2. ~/.config/RogueLegacyStorageContainer 3. ~/.local/share/RogueLegacy 4. ~/.local/share/RogueLegacyStorageContainer The ones containing "RogueLegacyStorageContainer" appear to be legacy paths (i.e.: paths which are only created by older versions of Rogue Legacy)[2]. So replace all globs with the full paths because: * The paths are known a priori (unlike, say, `/var/lib/libpcre*`) * There aren't too many of them And use only the non-legacy paths on mkdir. Besides mirroring what the current version of Rogue Legacy does (and avoiding the creation of unnecessary dirs), this is also done because _if_ the following applies (i.e.: this was not tested): * legacy paths take precedence over non-legacy paths * the first path clobbers the other ones (i.e.: rather than "merge") * save data exists in a non-legacy path (i.e.: path 3 in this case) * firejail creates all 4 paths Then it would make the newly-created and empty path 4 clobber the non-legacy path 3 and thus make it seem like no save files exist. This would persist even if steam is run without firejail afterwards, as the empty directory would still be there. Losing (or appearing to lose) game saves can be very unfortunate, so create just the non-legacy paths to avoid confusion. [1] #4170 (comment) [2] https://steamcommunity.com/app/241600/discussions/1/846957366713233279/ [3] https://www.pcgamingwiki.com/wiki/Rogue_Legacy#Game_data --- Original message below (for the thread to make sense): --- steam.profile: remove rogue legacy to fix syntax Remove the mkdir with globbing, which causes this: @davidebeatrici commented on 2021-04-23[1]: > ``` > Error: "${HOME}/.local/share/RogueLegacy*" is an invalid filename: rejected character: "*" > ``` Added on commit bd7ad371e ("steam: also added paths to disable-programs.inc") / PR #4170. The wildcard was used because Rogue Legacy apparently looks up multiple different paths for the config and also for the data[1][2][3]: 1. ~/.config/RogueLegacy 2. ~/.config/RogueLegacyStorageContainer 3. ~/.local/share/RogueLegacy 4. ~/.local/share/RogueLegacyStorageContainer The ones containing "RogueLegacyStorageContainer" appear to be legacy paths (i.e.: paths which are only created by older Rogue Legacy versions)[2]. So _if_ the following applies (i.e.: it was not tested): * legacy paths take precedence over non-legacy paths * the first path clobbers the other ones (i.e.: rather than "merge") * save data exists in a non-legacy path (i.e.: path 3 in this case) * firejail creates all 4 paths (as whitelisting requires existing paths) Then it would make the newly-created and empty path 4 clobber the non-legacy path 3 and thus make it seem like no save files exist. This would persist even if steam is run without firejail afterwards, as the empty directory would still be there. Losing (or appearing to lose) game saves can be very unfortunate, so just ignore all the Rogue Legacy paths for now to avoid confusion. Note: This is a problem whenever a program supports multiple clobbering paths and mkdir/mkfile + whitelisting is involved. [1] https://github.com/netblue30/firejail/pull/4170#issuecomment-825405930 [2] https://steamcommunity.com/app/241600/discussions/1/846957366713233279/ [3] https://www.pcgamingwiki.com/wiki/Rogue_Legacy#Game_data --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:31:43 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#5068
No description provided.