Improve check for absolute URI
authorStephan Bergmann <sbergman@redhat.com>
Mon, 19 Aug 2019 09:27:15 +0000 (11:27 +0200)
committerRene Engelhard <rene@debian.org>
Fri, 6 Sep 2019 09:53:15 +0000 (10:53 +0100)
Change-Id: I4dee44832107f72f8f3fb68554428dc1e646c346
Reviewed-on: https://gerrit.libreoffice.org/77706
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit c79efeb66f7951305d0334bc288aee1c571a8728)
Reviewed-on: https://gerrit.libreoffice.org/77724
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Gbp-Pq: Name Improve-check-for-absolute-URI.diff

scripting/source/pyprov/pythonscript.py

index 40074a9347b255a7cc43abcc9f46bfd1eb47ad79..38bac5da16714d03ccf8333fd068f4f452c387fe 100644 (file)
@@ -236,7 +236,7 @@ class MyUriHelper:
                 log.debug( message )
                 raise RuntimeException( message )
 
-            if xFileUri.isAbsolute():
+            if not xFileUri.hasRelativePath():
                 message = "pythonscript: an absolute uri is invalid '" + sFileUri+ "'"
                 log.debug( message )
                 raise RuntimeException( message )