From: Ingo Huerner Date: Thu, 5 Jun 2014 13:35:02 +0000 (+0200) Subject: Fixed bug 223 X-Git-Tag: 0.9.0~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98727be92f829ffbf8e5b9c7e02370495bf7e412;p=profile%2Fivi%2Fpersistence-client-library.git Fixed bug 223 --- 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();