Skip to content

Commit b7e8eab

Browse files
committed
Merge commit '40d40b29c6' into HEAD
2 parents df336b8 + 40d40b2 commit b7e8eab

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎android/app/src/main/kotlin/org/otzaria/otzaria/PdfFileExportStaging.kt‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ internal class PdfFileExportStaging private constructor(
5353
if (!OsConstants.S_ISREG(before.st_mode) || before.st_nlink != 1L || before.st_size <= 0L) {
5454
throw PdfFileExportFailure("invalid_source", "The staged PDF must be a nonempty regular file")
5555
}
56-
val descriptor = Os.open(path, OsConstants.O_RDONLY or OsConstants.O_CLOEXEC or OsConstants.O_NOFOLLOW, 0)
56+
// אם המקור הוחלף ב־FIFO, פתיחה רגילה תמתין לכותב לפני fstat.
57+
val flags = OsConstants.O_RDONLY or OsConstants.O_CLOEXEC or
58+
OsConstants.O_NOFOLLOW or OsConstants.O_NONBLOCK
59+
val descriptor = Os.open(path, flags, 0)
5760
try {
5861
val opened = Os.fstat(descriptor)
5962
if (!sameIdentity(opened, before) || opened.st_nlink != 1L || !OsConstants.S_ISREG(opened.st_mode)) {

0 commit comments

Comments
 (0)