Skip to content

Conversation

@rwf-rr
Copy link
Contributor

@rwf-rr rwf-rr commented Nov 28, 2024

When manually installed content has a path of only a top level directory, eg. "H:", then the Content form of the main Menu (Content button) will crash with an exception. The problem is in the code that attempts to find the most used content directory.

The fix is to ignore content that is installed in a directory without a parent directory.

The commit also includes fixing a simple typo in a variable name.

See also:
https://bugs.launchpad.net/or/+bug/2089801
https://www.elvastower.com/forums/index.php?/topic/38414-crash-with-content-manager/page__view__findpost__p__313090

Copy link
Contributor

@sweiland-openrails sweiland-openrails left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this. Testing ok. Never thought of adding just a drive and an empty name would be possible.

I do not like the continue and break statement that much, reminds me of a goto. But that's personal, leave it as it is.

regards, Siebren.

@sweiland-openrails sweiland-openrails added the bug Something isn't working label Nov 28, 2024
@Csantucci Csantucci added the for-unstable Special label to include a pull request in the Unstable Version label Nov 28, 2024
twpol pushed a commit that referenced this pull request Nov 28, 2024
- Pull request #1006 at 9c13d51: Bugfix: Content Form exception when there is manually installed content in a top level directory.
- Pull request #891 at 9a1d6b2: Auto save
- Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH
- Pull request #953 at a519452: Fix Lights Crash on Corrupt Shapes
- Pull request #961 at 8a9c8f9: Improvements for Power Supplies
- Pull request #981 at 10d297f: Multiple type trainset lightglows
- Pull request #995 at 95da33b: Fix: TrainCarOperations and TrainOperationsViewer windows overlap.
- Pull request #996 at 2fcbcde: Replace dynamic brakes by engine brakes at low speeds
- Pull request #1004 at 1828d97: Bugfix/fix train car operations brakehoses not sync coupling cars
- Pull request #900 at c27f32d: DMI updates
- Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder
- Pull request #1003 at c734592: Clean up logging during loading #or-std-log
Csantucci added a commit to Csantucci/openrails that referenced this pull request Nov 28, 2024
@cjakeman cjakeman merged commit e0a8e15 into openrails:master Nov 30, 2024
1 check passed
@rwf-rr rwf-rr deleted the bugfix-content-form-2089801 branch October 24, 2025 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working for-unstable Special label to include a pull request in the Unstable Version

Development

Successfully merging this pull request may close these issues.

4 participants