Red Hat Bugzilla – Bug 123069
dos2unix delete files.
Last modified: 2007-11-30 17:10:42 EST
Description of problem:
dos2unix filas when cuurent directory is on a different file system
output file. If output and input file is the same file, the input
Version-Release number of selected component (if applicable):
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
(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
Created attachment 100195 [details]
patch to fix problem
*** Bug 134361 has been marked as a duplicate of this bug. ***
Fixed in dos2unix-3.1-21. Thanks for your report.
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.