Bug 580046 - the file command returns zero exit code even in case of unexisting file being tested
Summary: the file command returns zero exit code even in case of unexisting file being...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Novotny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 548450 608686
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-07 11:33 UTC by Daniel Novotny
Modified: 2010-06-28 13:36 UTC (History)
2 users (show)

Fixed In Version:
Clone Of: 548450
Environment:
Last Closed: 2010-04-14 11:17:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
a patch to solve this (532 bytes, patch)
2010-04-14 10:52 UTC, Daniel Novotny
no flags Details | Diff
more elegant version of the patch (650 bytes, patch)
2010-04-14 10:58 UTC, Daniel Novotny
no flags Details | Diff

Description Daniel Novotny 2010-04-07 11:33:28 UTC
+++ This bug was initially created as a clone of Bug #548450 +++

Description of problem:

   %SUMMARY

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

   file-4.17-15.el5_3.1

How reproducible:

   Always

Steps to Reproduce:

[root@localhost ~]# file this_file_does_not_exist
this_file_does_not_exist: ERROR: cannot open `this_file_does_not_exist' (No such file or directory)
[root@localhost ~]# echo $?
0
[root@localhost ~]#
  
Actual results:

  Returns zero exitcode.

Expected results:

  Should IMHO return some non-zero exitcode.

Additional info:

--- Additional comment from pm-rhel on 2009-12-21 10:20:27 EST ---

This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 1 Daniel Novotny 2010-04-14 10:52:46 UTC
Created attachment 406467 [details]
a patch to solve this

Comment 2 Daniel Novotny 2010-04-14 10:58:24 UTC
Created attachment 406468 [details]
more elegant version of the patch

Comment 3 Daniel Novotny 2010-04-14 11:17:43 UTC
fixed in rawhide: file-5.04-8.fc14


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