From 98727be92f829ffbf8e5b9c7e02370495bf7e412 Mon Sep 17 00:00:00 2001 From: Ingo Huerner Date: Thu, 5 Jun 2014 15:35:02 +0200 Subject: [PATCH] Fixed bug 223 --- src/persistence_client_library_backup_filelist.h | 2 +- src/persistence_client_library_file.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/persistence_client_library_backup_filelist.h b/src/persistence_client_library_backup_filelist.h index 4c105b7..ac668f0 100644 --- a/src/persistence_client_library_backup_filelist.h +++ b/src/persistence_client_library_backup_filelist.h @@ -87,7 +87,7 @@ int pclCalcCrc32Csum(int fd, char crc32sum[]); * @param csumPath the path to the checksum file * @param openFlag the file open flags * - * @return + * @return -1 if the file could not be recovered or a positive value (>=0) on successful recovery */ int pclVerifyConsistency(const char* origPath, const char* backupPath, const char* csumPath, int openFlags); diff --git a/src/persistence_client_library_file.c b/src/persistence_client_library_file.c index d24257f..82e151c 100644 --- a/src/persistence_client_library_file.c +++ b/src/persistence_client_library_file.c @@ -494,7 +494,8 @@ int pclFileCreatePath(unsigned int ldbid, const char* resource_id, unsigned int } // we don't need the file handle here // the application calling this function must use the POSIX open() function to get an file descriptor - close(handle); + if(handle > 0) + close(handle); } handle = get_persistence_handle_idx(); -- 2.7.4