Bug 65548 - dos2unix fails when output is on other file system
Summary: dos2unix fails when output is on other file system
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: dos2unix
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-27 13:41 UTC by Need Real Name
Modified: 2007-04-18 16:42 UTC (History)
0 users

Fixed In Version: 3.1-21
Clone Of:
Environment:
Last Closed: 2004-10-20 15:31:16 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:195 0 low SHIPPED_LIVE dos2unix and unix2dos bug fix update 2005-05-19 04:00:00 UTC

Description Need Real Name 2002-05-27 13:41:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

Description of problem:
dos2unix filas when cuurent directory is on a different file system than the 
output file.  If output and input file is the same file, the input file is 
furthermore deleted.

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


How reproducible:
Always

Steps to Reproduce:
1. cd /home/user
2. touch /tmp/foo
3. dos2unix /tmp/foo
	

Actual Results:  If /home/usr and /tmp are on different file systems, /tmp/foo 
is permanently deleted.

Expected Results:  Left for the reader...

Additional info:

The cause is trivial, input file is `unlink'ed, output generated as a temporary 
file in the current directory and the tried `rename'd to the output location.  
`rename' obviously fails, as it cannot move between file systems.

Comment 1 Miloslav Trmač 2004-10-20 15:31:16 UTC
Fixed in dos2unix-3.1-21. Thanks for your report.

Comment 2 Tim Powers 2005-05-20 00:35:31 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-195.html



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