-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
UI: Create OBS Studio folder for default recording location #10974
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Warchamp7 marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -58,14 +58,20 @@ void CheckIfAlreadyRunning(bool &already_running) | |||||
|
|
||||||
| string GetDefaultVideoSavePath() | ||||||
| { | ||||||
| NSFileManager *fm = [NSFileManager defaultManager]; | ||||||
| NSURL *url = [fm URLForDirectory:NSMoviesDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:true | ||||||
| error:nil]; | ||||||
| NSFileManager *defaultManager = [NSFileManager defaultManager]; | ||||||
| NSURL *moviesDirectory = [defaultManager URLForDirectory:NSMoviesDirectory inDomain:NSUserDomainMask | ||||||
| appropriateForURL:nil | ||||||
| create:YES | ||||||
| error:nil]; | ||||||
|
|
||||||
| if (!url) | ||||||
| return getenv("HOME"); | ||||||
| if (moviesDirectory) { | ||||||
| const string videoSavePath = | ||||||
| [moviesDirectory URLByAppendingPathComponent:@"OBS-Studio" isDirectory:YES].path.fileSystemRepresentation; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Shouldn't this just be "OBS Studio"? Spaces are fine to pass as a component to this function, and I'm not aware of any issues with spaces in folder names for OBS. |
||||||
|
|
||||||
| return url.path.fileSystemRepresentation; | ||||||
| return videoSavePath; | ||||||
| } | ||||||
|
|
||||||
| return getenv("HOME"); | ||||||
| } | ||||||
|
|
||||||
| vector<string> GetPreferredLocales() | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be unnecessary as the directory is created on demand when a recording is started. OBS should not create an empty folder in the user's video folder just from being run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not create the folder on demand in my testing

I disagree and believe the folder should be initialized when OBS first runs like any app other storage location
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't an app storage location though, this is the user's data folders. Well-designed apps should respect a user's folder layout and not create empty files and directories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have some sort of guidance or documentation from Microsoft about that?
I have multiple applications on my system that have created folders for themselves in the Videos library location
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just good behavior, just because other apps are shitty doesn't mean we should also be shitty. There's plenty of evidence of of users who desire such behavior from their apps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One's shitty behaviour is another's expected behaviour though. And by that token I'd rather have an application create files in its own managed subdirectory than mess up the root of a data storage location.
I do agree that the directory should be created upon first use though. I don't remember Shadowplay creating directories for recordings or highlights until I actually triggered either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I concur with first use, as a user who does not enjoy all the random empty folders I have no intention of using.