Commit 673bd545 authored by Yoni Fogel's avatar Yoni Fogel

Error codes now propogate in log creation

git-svn-id: file:///svn/tokudb@694 c7de825b-a66e-492c-adef-691d508d4ae1
parent e6cf81f3
......@@ -16,9 +16,9 @@ int tokulogger_find_next_unused_log_file(const char *directory, long long *resul
DIR *d=opendir(directory);
long long max=-1;
struct dirent *de;
if (d==0) return errno;
if (d==0) return *result = errno;
while ((de=readdir(d))) {
if (de==0) return -errno;
if (de==0) return *result = -errno;
long long thisl;
int r = sscanf(de->d_name, "log%llu.tokulog", &thisl);
if (r==1 && thisl>max) max=thisl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment