Sign in to follow this  
gjl

#include in scriptbuilder addon may report wrong path on error

Recommended Posts

Hi,

 

I have noticed a minor issue with the scriptbuilder add-on when using include directives: if included files are missing, the reported path in the error message is a concatenation of the "current path" and the full path of the included file, which is awkward in most cases (like C:\MyDirectory\C:\MyOtherDirectory\missing_file.as" on Windows).

 

This is due to the fact that relative and absolute paths may be mixed when loading files. So I propose the simple modification in the attached patch. It's not perfect because it will report relative paths instead of full path when using LoadSectionFromFile with a path relative to the current path, but it avoids that wrong paths are reported in most other cases, so it seems a bit better than the current implementation until proper absolute/relative path management can be implemented.

 

What do you think?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this