Bug 123069

Summary: dos2unix delete files.
Product: [Fedora] Fedora Reporter: P Jones <bugzilla>
Component: dos2unixAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: nos
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.1-21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-31 17:24:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 183628    
Attachments:
Description Flags
patch to fix problem none

Description P Jones 2004-05-11 23:31:41 UTC
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:  it to work

Additional info:
(from another user)
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 P Jones 2004-05-12 17:08:26 UTC
Created attachment 100195 [details]
patch to fix problem

Comment 2 Mike A. Harris 2004-10-06 20:14:04 UTC
*** Bug 134361 has been marked as a duplicate of this bug. ***

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

Comment 4 Tim Powers 2005-05-20 00:35:35 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