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

Revert "Temporary hack for iOS: open files read-only if read-write open fails"

This reverts commit bdbb0d1c.  Assumed to no
longer be necessary after 9906c6d2
"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/51979Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst f08b396a
......@@ -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;
......
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