Handle MU_STREAM_ALLOW_LINKS.
Showing
1 changed file
with
6 additions
and
5 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_ino != filebuf.st_ino | 435 | && (fdbuf.st_dev != filebuf.st_dev |
436 | || fdbuf.st_nlink != 1 | 436 | || fdbuf.st_ino != filebuf.st_ino |
437 | || filebuf.st_nlink != 1 | 437 | || fdbuf.st_nlink != 1 |
438 | || (fdbuf.st_mode & S_IFMT) != S_IFREG) | 438 | || filebuf.st_nlink != 1 |
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