[Top][All Lists]

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

Re: [bug-patch] bug #44102: Patch doesn't check old file mode

From: Jesse Smith
Subject: Re: [bug-patch] bug #44102: Patch doesn't check old file mode
Date: Fri, 13 Sep 2019 19:42:34 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

I took a stab at addressing Savannah bug #44102 [1], which pointed out
Patch will silently change file permissions, even if the original
permissions listed in the diff file do not match the actual permissions
on the disk.

While looking into this issue I discovered a second, related issue. The
"old mode" field of diff files was always being read in as "0". This
meant we were always working with bad data on the starting point of file
permissions. I've attempted to fix this.

Also, I added a warning so when file permissions do not match "old mode"
the user is told. Also, if "--force" is not used, the original file
permissions are maintained. Both fixes are in the attached patch.

- Jesse

1. https://savannah.gnu.org/bugs/index.php?44102

Attachment: patch-44102.txt
Description: Text document

reply via email to

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