Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #43 from rproepp/contribution/absolute_root_path
Browse files Browse the repository at this point in the history
Absolute root path and making mod.io settings available in public API
  • Loading branch information
MarkusRannare authored Nov 30, 2020
2 parents 6cd74c4 + 6707bed commit c868aa9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Source/modio/Private/ModioSubsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ FModioSubsystemPtr FModioSubsystem::Create( const FString& RootDirectory, bool b
}

FString LocalRootDirectory = "";
if( bRootDirectoryIsInUserSettingsDirectory )

// Check for absolute path
if (!FPaths::IsRelative(RootDirectory))
{
LocalRootDirectory = RootDirectory;
}
else if( bRootDirectoryIsInUserSettingsDirectory )
{
FString UserSettingsDir = FPlatformProcess::UserSettingsDir();
LocalRootDirectory = UserSettingsDir + RootDirectory;
Expand Down
2 changes: 1 addition & 1 deletion Source/modio/Public/ModioSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ enum class ERunInEditorOn : uint8
};

UCLASS(config = Game, defaultconfig)
class UModioSettings : public UObject
class MODIO_API UModioSettings : public UObject
{
GENERATED_BODY()

Expand Down

0 comments on commit c868aa9

Please sign in to comment.