Changeset: da2ba6551778 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=da2ba6551778
Modified Files:
        clients/mapiclient/mclient.c
Branch: Dec2011
Log Message:

If no --database option, first non-option arg is database *if it is not a file*.
This was the intention according to the man page, but the check was
too liberal.


diffs (13 lines):

diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -2899,7 +2899,8 @@ main(int argc, char **argv)
        c = 0;
        has_fileargs = optind != argc;
 
-       if (dbname == NULL && has_fileargs && stat(argv[optind], &statb) != 0) {
+       if (dbname == NULL && has_fileargs &&
+           (stat(argv[optind], &statb) != 0 || !S_ISREG(statb.st_mode))) {
                dbname = argv[optind];
                optind++;
                has_fileargs = optind != argc;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to