mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Don't ignore the return value of symlink().
This commit is contained in:
@@ -112,7 +112,9 @@ static mrb_value
|
||||
mrb_io_test_file_setup(mrb_state *mrb, mrb_value self)
|
||||
{
|
||||
mrb_value ary = mrb_io_test_io_setup(mrb, self);
|
||||
symlink("/usr/bin", "test-bin");
|
||||
if (symlink("/usr/bin", "test-bin") == -1) {
|
||||
mrb_raise(mrb, E_RUNTIME_ERROR, "can't make a symbolic link");
|
||||
}
|
||||
|
||||
return ary;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user