Bug 123069 - dos2unix delete files.
dos2unix delete files.
Product: Fedora
Classification: Fedora
Component: dos2unix (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
: 134361 (view as bug list)
Depends On:
Blocks: 183628
  Show dependency treegraph
Reported: 2004-05-11 19:31 EDT by P Jones
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version: 3.1-21
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-01-31 12:24:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to fix problem (842 bytes, patch)
2004-05-12 13:08 EDT, P Jones
no flags Details | Diff

  None (edit)
Description P Jones 2004-05-11 19:31:41 EDT
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:

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 13:08:26 EDT
Created attachment 100195 [details]
patch to fix problem
Comment 2 Mike A. Harris 2004-10-06 16:14:04 EDT
*** Bug 134361 has been marked as a duplicate of this bug. ***
Comment 3 Miloslav Trmač 2004-10-20 11:31:32 EDT
Fixed in dos2unix-3.1-21. Thanks for your report.
Comment 4 Tim Powers 2005-05-19 20:35:35 EDT
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.


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