Ticket #2761 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

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:1 Changed 12 years ago by slyfox

  • Description modified (diff)

comment:2 Changed 12 years ago by slavazanko

  • Owner set to slavazanko
  • Status changed from new to accepted

comment:3 Changed 12 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 12 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:5 Changed 12 years ago by slavazanko

fixed.

comment:6 Changed 12 years ago by angel_il

  • Votes for changeset set to angel_il

comment:7 Changed 12 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 12 years ago by slavazanko

  • Status changed from accepted to testing
  • Keywords stable-candidate added
  • 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

comment:9 Changed 12 years ago by slavazanko

  • Keywords stable-candidate removed
  • Status changed from testing to closed
  • Votes for changeset changed from committed-master to committed-master committed-stable

Merged to stable:

git log --pretty=oneline d79db98..630b6a4
Note: See TracTickets for help on using tickets.