Handle MU_STREAM_ALLOW_LINKS.
Showing
1 changed file
with
3 additions
and
2 deletions
... | @@ -431,11 +431,12 @@ _file_open (stream_t stream) | ... | @@ -431,11 +431,12 @@ _file_open (stream_t stream) |
431 | 431 | ||
432 | /* Now check that: file and fd reference the same file, | 432 | /* Now check that: file and fd reference the same file, |
433 | file only has one link, file is plain file. */ | 433 | file only has one link, file is plain file. */ |
434 | if (fdbuf.st_dev != filebuf.st_dev | 434 | if (!(flags & MU_STREAM_ALLOW_LINKS) |
435 | && (fdbuf.st_dev != filebuf.st_dev | ||
435 | || fdbuf.st_ino != filebuf.st_ino | 436 | || fdbuf.st_ino != filebuf.st_ino |
436 | || fdbuf.st_nlink != 1 | 437 | || fdbuf.st_nlink != 1 |
437 | || filebuf.st_nlink != 1 | 438 | || filebuf.st_nlink != 1 |
438 | || (fdbuf.st_mode & S_IFMT) != S_IFREG) | 439 | || (fdbuf.st_mode & S_IFMT) != S_IFREG)) |
439 | { | 440 | { |
440 | mu_error (_("%s must be a plain file with one link\n"), filename); | 441 | mu_error (_("%s must be a plain file with one link\n"), filename); |
441 | close (fd); | 442 | close (fd); | ... | ... |
-
Please register or sign in to post a comment