Skip to content

Commit

Permalink
Fix bug when file not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
pons committed Jun 12, 2020
1 parent 9b7779c commit 5fde51c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Backup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ uint64_t Kangaroo::FTell(FILE* stream) {
bool Kangaroo::IsEmpty(std::string fileName) {

FILE *pFile = fopen(fileName.c_str(),"r");
if(pFile==NULL) {
::printf("OpenPart: Cannot open %s for reading\n",fileName.c_str());
::printf("%s\n",::strerror(errno));
::exit(0);
}
fseek(pFile,0,SEEK_END);
uint32_t size = ftell(pFile);
fclose(pFile);
Expand Down
2 changes: 1 addition & 1 deletion Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define CONSTANTSH

// Release number
#define RELEASE "1.11beta"
#define RELEASE "1.11gamma"

// Use symmetry
//#define USE_SYMMETRY
Expand Down

0 comments on commit 5fde51c

Please sign in to comment.