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

Added setting to change the directory screenshots are stored in #2787

Merged
merged 2 commits into from
May 4, 2020

Conversation

britown88
Copy link
Contributor

Was annoyed that all my screnshots were clogging up my user data path so whipped this up.

Uses boost filesystem for creating directories so should be cross platform and falls back to the user data directory if making the folder fails. I was torn on putting this in the ConfigurationManager because although it thematically fits, it needs the settings string passed into it and returns by-value. This seemed consistent enough with the behavior the configurationmanager already does in the constructor. Let me know if you dont like it there, I'm completely new to this codebase (and also deeply prefer c-style structure)

Tested relative and absolute paths on windows only.

@akortunov
Copy link
Collaborator

akortunov commented Apr 20, 2020

If I remembered correctly, we avoid to store paths in the settings.cfg due to security/safety reasons (such settings may lead to path traversals, allow to overwrite existing files, etc.).
For same reasons we escape special characters in player's name.

An another issue is absolute paths. They will make settings.cfg not portable across platforms.

@britown88
Copy link
Contributor Author

britown88 commented Apr 20, 2020

yeah i was pretty torn on absolute paths support. We could lock down the feature to just boolean 'store screenshots to a seperate folder in userdata' if that's more comfortable. Depending on y'alls feelings about settings.cfg backward compatibility, I'd even just kill it out of settings and make it the default behavior. Let me know.

The core feature here is having an option to declutter the user data folder.

@Capostrophic
Copy link
Collaborator

Capostrophic commented Apr 20, 2020

How about adding a new folder to user's local data directory called "screenshots" to put screenshots there?

It doesn't even need to be optional.

@akortunov
Copy link
Collaborator

How about adding a new folder to user's local data directory called "screenshots" to put screenshots there?

A good idea, but it may be not what PR's author wants.

@britown88
Copy link
Contributor Author

I figured that people would want this feature to be configurable but if not then there's no reason to navel-gaze on this. I've updated the feature to save screenshots in a folder in userdata called screenshots.

@psi29a
Copy link
Member

psi29a commented Apr 20, 2020

I figured that people would want this feature to be configurable but if not then there's no reason to navel-gaze on this. I've updated the feature to save screenshots in a folder in userdata called screenshots.

I like the cut of your jib.

@psi29a psi29a merged commit b8c467e into OpenMW:master May 4, 2020
psi29a pushed a commit that referenced this pull request Oct 5, 2020
These have been wrong since #2787
got merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants