summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-03-28 08:42:37 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-03-28 10:19:42 +0200
commitf86fb57510ebb5563c51859935e45f70aba06359 (patch)
treeb70b97015db0d2e136e32465b81d51b7f25fb360 /sal
parentf08b396a39ab2e06ad26b28322a0f0d47aebd82d (diff)
Revert "Temporary hack for iOS: open files read-only if read-write open fails"
This reverts commit bdbb0d1cc13a11c8c857ee2d387771a8c2622488. Assumed to no longer be necessary after 9906c6d2a55b6f8a27903f0ef08aa8949d7a71c2 "rhbz#1559633: Treat EPERM same as EACCES when opening files". Conflicts: sal/osl/unx/file.cxx Change-Id: I9f7ef544da3fec00810cd1d55bb52bf0470d1054 Reviewed-on: https://gerrit.libreoffice.org/51979 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file.cxx14
1 files changed, 0 insertions, 14 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 5d0af4d774be..27075be25e05 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -940,20 +940,6 @@ oslFileError openFilePath(const char *cpFilePath, oslFileHandle* pHandle, sal_uI
/* open the file */
int fd = open_c( cpFilePath, flags, mode );
-
-#ifdef IOS
- /* Horrible hack: If opening for RDWR and getting EPERM, just try
- * again for RDONLY. Quicker this way than to figure out why
- * we get that oh so useful General Error when trying to open a
- * read-only document.
- */
- if (fd == -1 && (flags & O_RDWR) && errno == EPERM)
- {
- int rdonly_flags = (flags & ~O_ACCMODE) | O_RDONLY;
- fd = open_c( cpFilePath, rdonly_flags, mode );
- }
-#endif
-
if (fd == -1)
{
int saved_errno = errno;