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

Allow JSR223 scripts with same name in different directories #3855

Merged

Conversation

triller-telekom
Copy link
Contributor

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

@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

closed/reopened for travis rebuild

@kaikreuzer
Copy link
Contributor

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
@triller-telekom triller-telekom deleted the scriptFolderScope branch July 24, 2017 14:07
@smerschjohann
Copy link
Contributor

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 pull request 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 pushed a commit to openhab/openhab-core that referenced this pull request 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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants