Details
-
Bug
-
Resolution: Done
-
P2: Important
-
1.0.0
-
None
-
servicebrowser example
Description
>> I think there is a minor bug in
>> qservicemanager_resolveLibraryPath().
>> Let's say I have such file/directory structure under Windows env:
>>
>> /project
>> /project/myserviceplugin
>> /project/myserviceplugin/bin
>> /project/myserviceplugin/bin/myserviceplugin.dll
>> /project/myserviceplugin/bin/tests.exe
>>
>> If I run tests from /project/myserviceplugin/bin/, everything works
>> fine. But if I run them from /project/ the
>> QFile::exists(libNameOrPath)
>> returns true and qservicemanager_resolveLibraryPath() returns just
>> "myserviceplugin" instead of
>> "/project/myserviceplugin/bin/myserviceplugin.dll". Then the plugin
>> loader tries to load "myserviceplugin", and fails, because
>in current
>> working dir it's a subdirectory, not a plugin.
>>
>> It's a rare case, but it might happen and it's not that obvious.