summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2014-06-01 13:18:16 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2014-06-01 13:18:16 (GMT)
commit6c0f32b6f37bbb70445731988b5ac180ef054357 (patch) (side-by-side diff)
tree42aeef0a6c6cba71f38ecd9cae165a48c31f1cf2
parentb425cc797090c46c3c9ab7b3052d322c4224bd76 (diff)
downloadvmod-binlog-6c0f32b6f37bbb70445731988b5ac180ef054357.tar.gz
vmod-binlog-6c0f32b6f37bbb70445731988b5ac180ef054357.tar.bz2
Bugfixes.
* src/binlogsel.c (mkfilename): Return a copy of file name if dir is NULL. (main): Directory (-D) defaults to cwd.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/binlogsel.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/binlogsel.c b/src/binlogsel.c
index c448bd5..d44c1b8 100644
--- a/src/binlogsel.c
+++ b/src/binlogsel.c
@@ -511,7 +511,10 @@ mkfilename(const char *dir, const char *file)
{
size_t dirlen, size;
char *ret;
-
+
+ if (!dir)
+ return xstrdup(file);
+
dirlen = strlen(dir);
while (dirlen > 0 && dir[dirlen-1] == '/')
--dirlen;
@@ -1082,6 +1085,8 @@ main(int argc, char **argv)
} else if (pattern) {
selglob(directory, convpattern(pattern));
} else {
+ if (!directory)
+ directory = ".";
selidx_year(directory);
}
if (module_done)

Return to:

Send suggestions and report system problems to the System administrator.