bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-ddrescue] [patch] abort if output file name and log file name are t


From: Jussi Judin
Subject: [Bug-ddrescue] [patch] abort if output file name and log file name are the same.
Date: Fri, 20 May 2011 13:44:09 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110402 Iceowl/1.0b2 Icedove/3.1.9

When ddrescue starts writing files and log file and output file are the same file, it opens output file first and log file after that and as a result, if you give those both files the same name, you will have only the log file as a result. This patch makes it harder to do mistakes like that by aborting if output file name and log file name are the same.

This does not protect against cases where you use full path for one file and relative for another or symbolic links but those kind of file name screw-ups are probably harder to do by accident.

--
Jussi Judin
https://jjudin.iki.fi/

Attachment: ddrescue-1.14-alert-if-output-and-log-are-the-same-file.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]