diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2023-12-14 12:15:10 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2023-12-15 09:23:56 +0100 |
commit | 58bfd8f982950566018f77ce8895963d914058f8 (patch) | |
tree | 597104de5710157fd55fc96fa7b4db78e15e6c48 /desktop | |
parent | f9e1b1c9f3d5a11a19fb60af564e865dbf2cd5c7 (diff) |
Fix backward vs. forward slashes on Windows
Change-Id: I24771a526848901ccedb15aa5dd7b373fe854977
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160765
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/updater.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx index fa3836596cc3..8796583df4d8 100644 --- a/desktop/source/app/updater.cxx +++ b/desktop/source/app/updater.cxx @@ -86,7 +86,12 @@ const char* pSofficeExeName = "soffice.exe"; OUString normalizePath(const OUString& rPath) { - OUString aPath = rPath.replaceAll("//", "/"); + OUString aPath = rPath; +#if defined WNT + aPath = aPath.replace('\\', '/'); +#endif + + aPath.replaceAll("//", "/"); // remove final / if (aPath.endsWith("/")) @@ -108,7 +113,10 @@ OUString normalizePath(const OUString& rPath) aPath = aTempPath.copy(0, i) + aPath.copy(nIndex + 3); } - return aPath.replaceAll("\\", "/"); +#if defined WNT + aPath = aPath.replace('/', '\\'); +#endif + return aPath; } void CopyFileToDir(const OUString& rTempDirURL, const OUString & rFileName, const OUString& rOldDir) |