Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • solarus solarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 222
    • Issues 222
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Solarus Games
  • solarussolarus
  • Issues
  • #1413

Closed
Open
Created Aug 16, 2019 by TwilCynder@TwilCynder💬Contributor

sol.file.open() doesn't use the right path

TL;DR : QuestFiles::get_full_quest_write_dir() tries to make the path based on the home path, in a way that doesn't work with Windows (places a / just after the home path, which already ends with a \, resulting in a \/in the final path)

When i call sol.file.open("filename"), which is supposed to open the file named "filename" in the quest writing directory, the path it tries to open is bugged :

image

In this precise case i called sol.file.open("settings.dat"). It seems like the engine wasn't able to get the full quest writing path, and more precisely to concatenate the $HOME directory and the solarus writing path ("/.solarus/<quest subdirectory>") correctly. Furthermore, i get a different error message if i try to open a file that doesn't exist, so it seems like the engine was actually able to acess the directory to confirm that my file actually existed, but then failed to open it.

I don't have any problem with other file-opening functions, such as sol.game.load() or sol.main.load_settings(), so it seems the problem is really specific.

Edited Aug 16, 2019 by TwilCynder
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking