Kaydet (Commit) 04f4702e authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix Python file URL construction on Windows

...after d7628186 "Create temp copies of test
docs in Python/UITests"

Change-Id: I4b6a5149c68f9e6cdc0a2037c07b50e8acc3623f
Reviewed-on: https://gerrit.libreoffice.org/52486Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 36ad6353
......@@ -9,6 +9,7 @@
from __future__ import print_function
import pathlib
import subprocess
import time
import uuid
......@@ -217,11 +218,7 @@ class UnoInProcess:
return self.openDocFromAbsolutePath(path, asTemplate)
def openDocFromAbsolutePath(self, file, asTemplate = False):
if os.name == "nt":
url = "file:///" + file
else:
url = "file://" + file
return self.openDocFromURL(url, asTemplate)
return self.openDocFromURL(pathlib.Path(file).as_uri(), asTemplate)
def openDocFromURL(self, url, asTemplate = False):
props = [("Hidden", True), ("ReadOnly", False), ("AsTemplate", asTemplate)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment