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
861f8ece
Kaydet (Commit)
861f8ece
authored
Tem 13, 2011
tarafından
Francois Tigeot
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplify osl_getTempDirURL()
Do not return different values depending on the platform
üst
6572e15d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
33 deletions
+9
-33
tempfile.c
sal/osl/unx/tempfile.c
+9
-33
No files found.
sal/osl/unx/tempfile.c
Dosyayı görüntüle @
861f8ece
...
...
@@ -49,53 +49,29 @@
#include "file_url.h"
#endif
/*****************************************************************/
/* osl_getTempFirURL */
/*****************************************************************/
oslFileError
SAL_CALL
osl_getTempDirURL
(
rtl_uString
**
pustrTempDir
)
{
#ifdef MACOSX
oslFileError
error
;
/* described in environ(7) */
const
char
*
pValue
=
getenv
(
"TMPDIR"
);
/* If TMPDIR environment variable is not set, use "/tmp" instead
of P_tmpdir because its value is "/var/tmp" and it is not
deleted on system start up */
if
(
!
pValue
)
pValue
=
"/tmp"
;
#else
const
char
*
pValue
=
getenv
(
"TEMP"
);
pValue
=
getenv
(
"TEMP"
);
if
(
!
pValue
)
pValue
=
getenv
(
"TMP"
);
#if defined(NETBSD)
if
(
!
pValue
)
pValue
=
_PATH_TMP
;
#else
if
(
!
pValue
)
pValue
=
P_tmpdir
;
#endif
if
(
!
pValue
)
pValue
=
"/tmp"
;
#endif
/* MACOSX */
if
(
pValue
)
{
oslFileError
error
;
rtl_uString
*
ustrTempPath
=
NULL
;
rtl_uString
*
ustrTempPath
=
NULL
;
rtl_string2UString
(
&
ustrTempPath
,
pValue
,
strlen
(
pValue
),
osl_getThreadTextEncoding
(),
OSTRING_TO_OUSTRING_CVTFLAGS
);
OSL_ASSERT
(
ustrTempPath
!=
NULL
);
error
=
osl_getFileURLFromSystemPath
(
ustrTempPath
,
pustrTempDir
);
rtl_uString_release
(
ustrTempPath
);
rtl_string2UString
(
&
ustrTempPath
,
pValue
,
strlen
(
pValue
),
osl_getThreadTextEncoding
(),
OSTRING_TO_OUSTRING_CVTFLAGS
);
OSL_ASSERT
(
ustrTempPath
!=
NULL
);
error
=
osl_getFileURLFromSystemPath
(
ustrTempPath
,
pustrTempDir
);
rtl_uString_release
(
ustrTempPath
);
return
error
;
}
else
return
osl_File_E_NOENT
;
return
error
;
}
/******************************************************************
...
...
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