From 458cf0c513588f186dd90bc34ad78d0c12737104 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Tue, 29 Mar 2011 11:57:44 +0000 Subject: [PATCH] Fix #5891 (the simpler version). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@38126 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/FileName.cpp | 5 ++++- status.16x | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp index 3dd718a690..e6e7f25f10 100644 --- a/src/support/FileName.cpp +++ b/src/support/FileName.cpp @@ -557,7 +557,10 @@ unsigned long FileName::checksum() const return result; struct stat info; - fstat(fd, &info); + if (fstat(fd, &info)) { + close(fd); + return result; + } void * mm = mmap(0, info.st_size, PROT_READ, MAP_PRIVATE, fd, 0); diff --git a/status.16x b/status.16x index f07088b211..d3a4156954 100644 --- a/status.16x +++ b/status.16x @@ -77,6 +77,7 @@ What's new - Issue a warning when an included file could not be loaded (bug 7343). +- Fix freezing of LyX at samba shares (bug 5891). * DOCUMENTATION AND LOCALIZATION