Hello,

Le 06/08/2015 21:08, Toby Speight a écrit :
Package: jhead
Version: 1:3.00-1
Severity: normal

I have a writable directory containing some JPEG files that are
non-writable for me.  I want to rename them by their timestamps (but
not to inadvertently change their content).  But "jhead -n" refuses,
saying "Skipping readonly file".

The -n option doesn't write the file at all, only the directory, and "mv" has
no objections to that.  But jhead doesn't check the directory's permissions
in the same way, so it's completely inconsistent.  I tried an experiment with
a read-only directory containing writable files, and it tried to rename them,
reporting the error: "Error: Couldn't rename ..."

Instead of skipping readonly files, it makes sense to continue as normal
until/unless a system call gives us a failure, then report it - like
every other Unix utility.  That's more reliable that doing access()
checks, or whatever it is that jhead does.

Great idea!

Can you propose a patch? That would help a lot.

Bye

--
 Dr. Ludovic Rousseau


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to