Skip to content

Commit b87ebf0

Browse files
committed
* inst/private/read_dbtable_csv.m: check fopen opens file
1 parent 3550bc1 commit b87ebf0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

inst/private/read_dbtable_csv.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
colnames = {};
2525

2626
fd = fopen(filename, "rt");
27+
if fd == -1
28+
error ("Cant open file '%s'", filename);
29+
endif
2730
unwind_protect
2831
l = fgetl(fd);
2932
colnames = strsplit(l, ",");

0 commit comments

Comments
 (0)