Skip to content
This repository has been archived by the owner. It is now read-only.

Allow JSR223 scripts with same name in different directories #3855

Merged

Conversation

@triller-telekom
Copy link
Contributor

@triller-telekom triller-telekom commented Jul 19, 2017

Fixes #3801

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

Fixes eclipse-archived#3801

Signed-off-by: Stefan Triller <stefan.triller@telekom.de>
@triller-telekom
Copy link
Contributor Author

@triller-telekom triller-telekom 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
Copy link
Contributor Author

@triller-telekom triller-telekom commented Jul 21, 2017

closed/reopened for travis rebuild

@kaikreuzer
Copy link
Contributor

@kaikreuzer kaikreuzer 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-archived:master Jul 24, 2017
2 checks passed
@triller-telekom triller-telekom deleted the scriptFolderScope branch Jul 24, 2017
@smerschjohann
Copy link
Contributor

@smerschjohann smerschjohann 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
5iver pushed a commit to 5iver/openhab-core that referenced this issue Apr 15, 2019
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-archived/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 issue Apr 18, 2019
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-archived/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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants