diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-08-04 22:44:06 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-08-04 23:50:54 +0200 |
commit | 8bf374b98d07c24a37933b8c03a53abb3a8ff5c6 (patch) | |
tree | cef9230b666470e76b18705bec72a98bc167f2ee /wizards | |
parent | tdf#76845: vcl: main thread does not necessarily have SolarMutex (diff) | |
download | core-8bf374b98d07c24a37933b8c03a53abb3a8ff5c6.tar.gz core-8bf374b98d07c24a37933b8c03a53abb3a8ff5c6.zip |
wizards: FileAccess.getURL does not work on Windows
The hard-coded "/" separator causes getFileURLFromSystemPath to fail,
and it's not obvious why the URL is being converted to a system path
in the first place.
Change-Id: I06ebe6d92954c4f3c884ae6f0b327ea8a36c10a4
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/common/FileAccess.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py index 0e67851d7640..7ff92c37790f 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.py +++ b/wizards/com/sun/star/wizards/common/FileAccess.py @@ -303,10 +303,12 @@ class FileAccess(object): i += 1 return url - def getURL(self, parentPath, childPath): - parent = self.filenameConverter.getSystemPathFromFileURL(parentPath); - path = parent + "/" + childPath - return self.filenameConverter.getFileURLFromSystemPath(parentPath, path) + def getURL(self, parentURL, childPath): + if len(childPath) > 0 and childPath[0] == "/": + path = parentURL + childPath + else: + path = parentURL + "/" + childPath + return path def getURL1(self, path): f = "/" |