diff options
author | Ingo Huerner <ingo.huerner@xse.de> | 2014-06-05 15:35:02 +0200 |
---|---|---|
committer | Ingo Huerner <ingo.huerner@xse.de> | 2014-06-05 15:35:02 +0200 |
commit | 98727be92f829ffbf8e5b9c7e02370495bf7e412 (patch) | |
tree | 7d6b9bd2d287873e47ad02802e784f3167cf94ba | |
parent | 02331d045e60dc4b256d60bb00fde258d9ce2ef4 (diff) | |
download | persistence-client-library-98727be92f829ffbf8e5b9c7e02370495bf7e412.tar.gz |
Fixed bug 223
-rw-r--r-- | src/persistence_client_library_backup_filelist.h | 2 | ||||
-rw-r--r-- | 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(); |