Ticket #2761 (closed defect: fixed)
save file on top of existing directory changes dir's permissions
Reported by: | slyfox | Owned by: | slavazanko |
---|---|---|---|
Priority: | major | Milestone: | 4.8.3 |
Component: | mc-core | Version: | 4.8.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master committed-stable |
Description (last modified by slyfox) (diff)
Steps to reproduce:
mkdir foo chmod 0700 foo mcedit bar # Shift+F2 # save as 'foo' # Overwrite? Yes # Save anyway? Yes # Exit ls -ld foo drw-r--r-- 1 slyfox users 0 Mar 22 22:10 foo
We've lost dir's permissions.
Original bug report by Marcin Mirosław:
http://bugs.gentoo.org/409365
Change History
comment:2 Changed 13 years ago by slavazanko
- Owner set to slavazanko
- Status changed from new to accepted
comment:3 Changed 13 years ago by slavazanko
- Branch state changed from no branch to on review
- Milestone changed from Future Releases to 4.8.3
Created branch 2761_editor_save_as_dir
Review, please
comment:4 Changed 13 years ago by slyfox
if (S_ISDIR (sb.st_mode))
Maybe !S_ISREG is a bit better?
No point to save a file to a dir, special device, socket, solaris door, etc.
What do you think?
comment:7 Changed 13 years ago by andrew_b
- Votes for changeset changed from angel_il to angel_il andrew_b
- Branch state changed from on review to approved
comment:8 Changed 13 years ago by slavazanko
- Keywords stable-candidate added
- Status changed from accepted to testing
- Votes for changeset changed from angel_il andrew_b to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged
Merged to master:
git log --pretty=oneline 3907f19..2a5885f
Note: See
TracTickets for help on using
tickets.