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
6edbcc1b
Kaydet (Commit)
6edbcc1b
authored
Eki 31, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cid#1242936 handle rename failure
Change-Id: I92ce690a6f8183ce77c8ed53bd2fcb45d39d756e
üst
f13678d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
file.h
include/osl/file.h
+5
-1
file_misc.cxx
sal/osl/unx/file_misc.cxx
+18
-3
No files found.
include/osl/file.h
Dosyayı görüntüle @
6edbcc1b
...
...
@@ -1309,7 +1309,9 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_removeFile(
osl_File_E_NAMETOOLONG file name too long<br>
osl_File_E_NOENT no such file or directory<br>
osl_File_E_ISDIR is a directory<br>
osl_File_E_ROFS read-only file system<p>
osl_File_E_ROFS read-only file system<br>
osl_File_E_BUSY if the implementation internally requires resources that are
(temporarily) unavailable (added with LibreOffice 4.4)
@see osl_moveFile()
@see osl_removeFile()
...
...
@@ -1339,6 +1341,8 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_copyFile(
osl_File_E_NAMETOOLONG file name too long<br>
osl_File_E_NOENT no such file or directory<br>
osl_File_E_ROFS read-only file system<br>
osl_File_E_BUSY if the implementation internally requires resources that are
(temporarily) unavailable (added with LibreOffice 4.4)
@see osl_copyFile()
*/
...
...
sal/osl/unx/file_misc.cxx
Dosyayı görüntüle @
6edbcc1b
...
...
@@ -810,6 +810,8 @@ static oslFileError oslDoCopy(const sal_Char* pszSourceFileName, const sal_Char*
if
(
DestFileExists
)
{
//TODO: better pick a temp file name instead of adding .osl-tmp:
strncpy
(
pszTmpDestFile
,
pszDestFileName
,
size_tmp_dest_buff
-
1
);
if
((
strlen
(
pszTmpDestFile
)
+
strlen
(
TMP_DEST_FILE_EXTENSION
))
>=
size_tmp_dest_buff
)
...
...
@@ -817,9 +819,22 @@ static oslFileError oslDoCopy(const sal_Char* pszSourceFileName, const sal_Char*
strncat
(
pszTmpDestFile
,
TMP_DEST_FILE_EXTENSION
,
strlen
(
TMP_DEST_FILE_EXTENSION
));
/* FIXME: what if pszTmpDestFile already exists? */
/* with getcanonical??? */
nRet
=
rename
(
pszDestFileName
,
pszTmpDestFile
);
if
(
rename
(
pszDestFileName
,
pszTmpDestFile
)
!=
0
)
{
if
(
errno
==
ENOENT
)
{
DestFileExists
=
0
;
}
else
{
int
e
=
errno
;
SAL_INFO
(
"sal.osl"
,
"rename("
<<
pszDestFileName
<<
", "
<<
pszTmpDestFile
<<
") failed with errno "
<<
e
);
return
osl_File_E_BUSY
;
// for want of a better error code
}
}
}
/* mfe: should be S_ISREG */
...
...
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