summaryrefslogtreecommitdiff
path: root/store
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2004-12-23 10:32:50 +0000
committerVladimir Glazounov <vg@openoffice.org>2004-12-23 10:32:50 +0000
commitc03c285854c7cf7917fd3250569663c0e0898153 (patch)
treec00e664acb8e95d55c777e918a73cedc065d3042 /store
parent37330ce6bd216c1cedbf2dc99cd5359f53edd79b (diff)
INTEGRATION: CWS mhu05 (1.2.78); FILE MERGED
2004/12/09 18:03:25 mhu 1.2.78.1: #i38646# Disabled internal commit (sync) to disk (STORE_FEATURE_COMMIT). Improved propagation of errors from fsync() and close() calls.
Diffstat (limited to 'store')
-rw-r--r--store/source/filew32.hxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/store/source/filew32.hxx b/store/source/filew32.hxx
index bcb56747a525..997c212b4b16 100644
--- a/store/source/filew32.hxx
+++ b/store/source/filew32.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: filew32.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: hr $ $Date: 2003-03-27 14:06:34 $
+ * last change: $Author: vg $ $Date: 2004-12-23 11:32:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -84,6 +84,8 @@ static const __store_errcode_mapping_st __store_errcode_map[] =
{ ERROR_LOCK_VIOLATION, store_E_LockingViolation },
{ ERROR_INVALID_HANDLE, store_E_InvalidHandle },
{ ERROR_INVALID_PARAMETER, store_E_InvalidParameter },
+ { ERROR_DISK_FULL, store_E_OutOfSpace },
+ { ERROR_HANDLE_DISK_FULL, store_E_OutOfSpace },
};
/*
@@ -275,17 +277,23 @@ inline storeError __store_ftrunc (HSTORE h, sal_uInt32 n)
/*
* __store_fsync.
*/
-inline void __store_fsync (HSTORE h)
+inline storeError __store_fsync (HSTORE h)
{
- ::FlushFileBuffers (h);
+ if (!::FlushFileBuffers (h))
+ return ERROR_FROM_NATIVE(::GetLastError());
+ else
+ return store_E_None;
}
/*
* __store_fclose.
*/
-inline void __store_fclose (HSTORE h)
+inline storeError __store_fclose (HSTORE h)
{
- ::CloseHandle (h);
+ if (!::CloseHandle (h))
+ return ERROR_FROM_NATIVE(::GetLastError());
+ else
+ return store_E_None;
}
#endif /* INCLUDED_STORE_FILEW32_HXX */