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

Project has become unworkable after path changes #66273

Closed
Kamayana opened this issue Jun 18, 2023 · 6 comments · Fixed by #66287
Closed

Project has become unworkable after path changes #66273

Kamayana opened this issue Jun 18, 2023 · 6 comments · Fixed by #66287
Labels
(S2 - Confirmed) Bug that's been confirmed to exist

Comments

@Kamayana
Copy link
Contributor

Kamayana commented Jun 18, 2023

Describe the bug

#65822 has unfortunately made the project unworkable for me (I'm using Windows 10, Visual Studio 2022). After updating my fork and building, the game said I had no saves available, even though there were plenty in ./save. Looking in the directory, I saw that the game had created new folders named .save, .config, etc., and was trying to use those.

image

After copying my saves into that folder they would show up, but fail to load with this error:

image

I'm able to start a new game just fine and load into the game, but after save-quitting and trying to load the save it just created, I get the same error.

I made a fresh clone of the newest upstream to see if that would fix it but that was even worse - the .exe couldn't even get to the title screen, just showing the error Failed to write options to "./config/options.json": opening file failed.

Noticing that #65822 affected the paths, I tested it by resetting my fork to that commit (a6233fc), and it failed. I then reset to right before that commit (ef1335a) and it worked fine.

Attach save file

N/A

Steps to reproduce

  1. Clone current repository.
  2. Build
  3. Run and it'll create .save/.config directories it shouldn't be using.

Expected behavior

For the paths to not get mucked up.

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.3086 (22H2)
  • Game Version: a36cd13 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth],
    Bionic Professions [package_bionic_professions],
    No Rail Stations [No_Rail_Stations]
    ]

Additional context

The user Love has said on Discord that Android builds fine, so this might be Windows-specific.

@Kamayana Kamayana added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Jun 18, 2023
@rselias
Copy link
Contributor

rselias commented Jun 18, 2023

Same issue. Also on Windows.

@SurFlurer
Copy link
Contributor

Same issue. Me on Windows too.

@Alm999
Copy link
Contributor

Alm999 commented Jun 18, 2023

This is the same issue:
#66261

@PatrikLundell
Copy link
Contributor

/confirmed

Windows (Visual Studio) as well.

It worked two days ago, but the code downloaded and compiled today does not find the saved games.
As noted in the report, .config, .save, .templates, and .font directories were created. These directories are empty.

@github-actions github-actions bot added (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Jun 18, 2023
@Procyonae
Copy link
Contributor

Is anyone working on a fix for this bc if not temporarily reverting the PR would seem like a good idea

@alef
Copy link
Contributor

alef commented Jun 18, 2023

Is anyone working on a fix for this bc if not temporarily reverting the PR would seem like a good idea

Yes. The function lexically_normal() transform ./ to ., that's why all those .dir/ instead of ./dir/.
Problem is some paths are still using string concatenation instead of fs' append operator.
Will fix that in https://github.com/alef/Cataclysm-DDA/tree/fix-66273 .

bombasticSlacks pushed a commit that referenced this issue Jun 18, 2023
* Append a path delimiter for the 'dot' directory.

* Update src/filesystem.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants