Commit 863b7749 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

port logcursor to windows [t:1942]

git-svn-id: file:///svn/toku/tokudb@14035 c7de825b-a66e-492c-adef-691d508d4ae1
parent 0a7b6e99
...@@ -94,15 +94,14 @@ int toku_logcursor_create(TOKULOGCURSOR *lc, const char *log_dir) { ...@@ -94,15 +94,14 @@ int toku_logcursor_create(TOKULOGCURSOR *lc, const char *log_dir) {
cursor->cur_logfiles_index = 0; cursor->cur_logfiles_index = 0;
cursor->entry_valid = FALSE; cursor->entry_valid = FALSE;
// cursor->logdir must be an absolute path // cursor->logdir must be an absolute path
if ( log_dir[0]=='/' ) { if (toku_os_is_absolute_name(log_dir)) {
cursor->logdir = (char *) toku_malloc(strlen(log_dir)+1); cursor->logdir = (char *) toku_malloc(strlen(log_dir)+1);
if ( cursor->logdir == NULL ) { if ( cursor->logdir == NULL ) {
failresult = ENOMEM; failresult = ENOMEM;
goto fail; goto fail;
} }
sprintf(cursor->logdir, "%s", log_dir); sprintf(cursor->logdir, "%s", log_dir);
} } else {
else {
char *cwd = getcwd(NULL, 0); char *cwd = getcwd(NULL, 0);
if ( cwd == NULL ) { if ( cwd == NULL ) {
failresult = -1; failresult = -1;
......
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