Skip to content
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

Allow JSR223 scripts with same name in different directories #3855

Merged
merged 1 commit into from Jul 24, 2017

Conversation

Projects
None yet
3 participants
@triller-telekom
Copy link
Contributor

commented Jul 19, 2017

Fixes #3801

Signed-off-by: Stefan Triller stefan.triller@telekom.de

Allow JSR223 scripts with same name in different directories
Fixes #3801

Signed-off-by: Stefan Triller <stefan.triller@telekom.de>
@triller-telekom

This comment has been minimized.

Copy link
Contributor Author

commented Jul 19, 2017

@smerschjohann: Was there a specific reason for just comparing the filename and not the whole path? Because in the whole ScriptFileWatcher you are working on URLs which have the full path...

@triller-telekom

This comment has been minimized.

Copy link
Contributor Author

commented Jul 21, 2017

closed/reopened for travis rebuild

@kaikreuzer

This comment has been minimized.

Copy link
Member

commented Jul 24, 2017

I would assume that the reason was that he derived the UIDs from the file name and thus wanted to rule out any duplicates. As we are by now generating a UUID, I would hope that this is no issue anymore, so your change should be fine (@smerschjohann, please correct me, if I am wrong).

@kaikreuzer kaikreuzer merged commit af2344e into eclipse:master Jul 24, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
ip-validation
Details

@triller-telekom triller-telekom deleted the triller-telekom:scriptFolderScope branch Jul 24, 2017

@smerschjohann

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2017

yes, you are right. It was a bad idea to rely only one the filename. I did not think about the "same name in different directories" case.

Thanks for this

@kaikreuzer kaikreuzer added this to the 0.9.0 milestone Nov 30, 2017

@kaikreuzer kaikreuzer added the bug label Dec 15, 2017

openhab-5iver added a commit to openhab-5iver/openhab-core that referenced this pull request Apr 15, 2019

Sort by filename instead of path
Currently, the scripts are loaded based on the lexicographical order of
the absolute paths of the scripts. This makes it difficult to control
the load order. This change bases the load order solely on the filename,
as was originally used before
eclipse/smarthome#3855, and preserves the
ability to use scripts with the same filename.

Signed-off-by: Scott Rushworth <openhab@5iver.com>

maggu2810 added a commit to openhab/openhab-core that referenced this pull request Apr 18, 2019

Sort by filename instead of path (#724)
Currently, the scripts are loaded based on the lexicographical order of
the absolute paths of the scripts. This makes it difficult to control
the load order. This change bases the load order solely on the filename,
as was originally used before
eclipse/smarthome#3855, and preserves the
ability to use scripts with the same filename.

Signed-off-by: Scott Rushworth <openhab@5iver.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.