Merge pull request #9182 from thingsboard/LwM2M_Resource_path_for_Install_Script_isNULL

[fix_bug][3.5.2] LwM2M Resource path for Install Script is 'NULL'
This commit is contained in:
Andrew Shvayka 2023-09-05 17:15:28 +03:00 committed by GitHub
commit 3e9ebe48ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -299,7 +299,7 @@ public class InstallScripts {
} }
public void loadSystemLwm2mResources() { public void loadSystemLwm2mResources() {
Path resourceLwm2mPath = Paths.get(dataDir, MODELS_LWM2M_DIR); Path resourceLwm2mPath = Paths.get(getDataDir(), MODELS_LWM2M_DIR);
try (DirectoryStream<Path> dirStream = Files.newDirectoryStream(resourceLwm2mPath, path -> path.toString().endsWith(InstallScripts.XML_EXT))) { try (DirectoryStream<Path> dirStream = Files.newDirectoryStream(resourceLwm2mPath, path -> path.toString().endsWith(InstallScripts.XML_EXT))) {
dirStream.forEach( dirStream.forEach(
path -> { path -> {