Bug 100538 - gv issues a misleading error message when asked to open zero-sized file
Summary: gv issues a misleading error message when asked to open zero-sized file
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gv
Version: rawhide
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Dan Williams
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-23 07:46 UTC by Alexandre Oliva
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-20 03:41:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Alexandre Oliva 2003-07-23 07:46:10 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703

Description of problem:
If gv is asked to open a zero-sized file, it says the file does not exist.

Version-Release number of selected component (if applicable):
gv-3.5.8-23

How reproducible:
Always

Steps to Reproduce:
1.create a zero-sized file named foo.ps
  $ > foo.ps
2.Ask gv to open it:
  $ gv foo.ps


Actual Results:  gv: Cannot open file foo.ps (No such file or directory)


Expected Results:  It should open the file and display a blank page, like it
does for a one-blank-line file.

Additional info:

strace seems to indicate it does fine the file, but it's probably not happy that
it has size zero.  When it has non-zero size, the first stat64 is followed by an
open.

stat64("foo.ps", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
stat64("foo.ps.ps", 0xbff00be0)           = -1 ENOENT (No such file or directory)
stat64("foo.ps", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
write(2, "gv: Cannot open file foo.ps (No su"..., 56gv: Cannot open file foo.ps
(No such file or directory)
) = 56
exit_group(1)                           = ?

Comment 1 Dan Williams 2004-09-20 03:41:26 UTC
should be fixed in 3.5.8-26 or later


Note You need to log in before you can comment on or make changes to this bug.