summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-01-25 12:47:51 +0000
committerOliver Bolte <obo@openoffice.org>2005-01-25 12:47:51 +0000
commit27dab103de94feee0c8218c34d9b3fa7e6e8c219 (patch)
tree9c07a73c9c863036caa10c9d83d74667cefe221b /sal
parentff093a802d84689857d8cb5720870e04f26abf79 (diff)
INTEGRATION: CWS trabugfixingso8 (1.6.62); FILE MERGED
2005/01/20 12:39:17 tra 1.6.62.1: #i38628# removed fsync call in oslDoCopyFile evaluating return value of close instead
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file.cxx27
1 files changed, 10 insertions, 17 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 8a8e938e0..75c72b53e 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: file.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: obo $ $Date: 2004-09-08 16:15:27 $
+ * last change: $Author: obo $ $Date: 2005-01-25 13:47:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2057,23 +2057,16 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD
close(DestFileFD);
return nRet;
}
-
- /* #112584# ensure the data have really been written to the destination
- file. When working over NFS, write may return another number of
- bytes written then really arrived at the physical target medium. The
- alternative would be to open the destimation file with the flag O_SYNC
- which slows down the overall write performance. */
- if (fsync(DestFileFD) == -1)
- {
- close(SourceFileFD);
- close(DestFileFD);
- return errno;
- }
close(SourceFileFD);
- close(DestFileFD);
-
- return 0;
+
+ // Removed call to 'fsync' again (#112584#) and instead
+ // evaluate the return value of 'close' in order to detect
+ // and report ENOSPC and other erronous conditions on close
+ if (close(DestFileFD) == -1)
+ return errno;
+ else
+ return 0;
}
/*****************************************