Skip to content

[BUG] Relative paths on SaveToFile methods #28

@hineios

Description

@hineios

While using RolePlayerAsset.SaveToFile(string path) where path is both a relative path and a different path from the original RPC file, the references to the components of the RPC (EDM, EA, etc) are saved with wrong relative paths.

A quickfix would be to use absolute paths (using the System.IO.Path.GetFullPath method) for every LoadFromFile and SaveToFile methods as such:

IntegratedAuthoringToolAsset IAT = IntegratedAuthoringToolAsset.LoadFromFile(Path.GetFullPath("Example Folder\\Example-IAT.iat"));
RolePlayCharacterAsset RPC = RolePlayCharacterAsset.LoadFromFile(Path.GetFullPath("Example Folder\\ExampleRPC.rpc"));
RPC.SaveToFile(Path.GetFullPath("Example Final Folder\\ExampleFinalRPC.rpc"));

This will put the correct relative paths into the final RPC file.
Please do note that System.IO.Path.GetFullPath returns a full path relative to the current working directory.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions