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

Editor file dialog uses botched relative paths #7

Open
stubb opened this issue Mar 14, 2016 · 4 comments
Open

Editor file dialog uses botched relative paths #7

stubb opened this issue Mar 14, 2016 · 4 comments

Comments

@stubb
Copy link
Member

stubb commented Mar 14, 2016

From @prock-fife on December 1, 2011 21:32

This issue was reported by Fabian Streitel fife@rottenrei.be

When opening/saving a file in the editor, it does two things that are surprising/broken:

  1. it mixes a bunch of directories together (all that are registered with VFS as root directories), which is weird if you register more than one (which we do at UH)
  2. it assumes all of these paths are relative to ./.., which is obviously not the case for directories that are relative to, e.g. the UH root directory.

I modified the code to always use absolute paths, which was a) easy to do and b) fixes both of these problems. See the attached patch, which is relative to the trunk.

Copied from original issue: fifengine/fifengine#616

@stubb
Copy link
Member Author

stubb commented Mar 14, 2016

From @prock-fife on December 1, 2011 21:33

This comment was posted by Fabian Streitel fife@rottenrei.be

Patch that fixes weird filebrowser behaviour

@stubb
Copy link
Member Author

stubb commented Mar 14, 2016

From @vtchill on December 1, 2011 22:4

I can see this being a good change. I essentially do the same thing in the c++ loaders by making the map directory absolute and then using that to load any referenced object/animation/atlas files.

@stubb
Copy link
Member Author

stubb commented Mar 14, 2016

From @prock-fife on June 20, 2013 16:55

I just had a bit of a brainstorm on this issue. Why not create an additional file (or some additional map properties) that would store several paths (e.g. project working directory, resource directory, etc etc). These would be taken into account when loading/saving a map with the editor. It would also allow the clients to specify root directory of their project so all objects do not have to be loaded from the map file relative to the map files location.

I believe map files can already include additional object import directories (relative to the map file itself). We could add another map property that would add additional VFS virtual directories so those object imports can happen relative to an arbitrary path.

@stubb
Copy link
Member Author

stubb commented Mar 14, 2016

From @Beliaar on February 5, 2014 16:52

Hmm, I did not see this issue before, but I think 7ba165a6562940534810f604362e5965bd37e256 fixes the main problem of this isse.

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