Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
bdbb0d1c
Kaydet (Commit)
bdbb0d1c
authored
Mar 23, 2013
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Temporary hack for iOS: open files read-only if read-write open fails
Change-Id: Ifc400d9843b23ef942c43af3a2b8830ccff71a7e
üst
2672cbdd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
file.cxx
sal/osl/unx/file.cxx
+12
-0
No files found.
sal/osl/unx/file.cxx
Dosyayı görüntüle @
bdbb0d1c
...
...
@@ -911,6 +911,18 @@ SAL_CALL osl_openFilePath( const char *cpFilePath, oslFileHandle* pHandle, sal_u
/* open the file */
int
fd
=
open
(
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
(
-
1
==
fd
&&
(
flags
&
O_RDWR
)
&&
EPERM
==
errno
)
{
int
rdonly_flags
=
(
flags
&
~
O_ACCMODE
)
|
O_RDONLY
;
fd
=
open
(
cpFilePath
,
rdonly_flags
,
mode
);
}
#endif
if
(
-
1
==
fd
)
{
int
saved_errno
=
errno
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment