Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

savannah: "save as" retains mode #82

Closed
mc-butler opened this issue Dec 26, 2008 · 21 comments
Closed

savannah: "save as" retains mode #82

mc-butler opened this issue Dec 26, 2008 · 21 comments
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/82
Reporter ossi (@ossilator)
Mentions imdagger@….ru

Original: http://savannah.gnu.org/bugs/?23512

Submitted by:Oswald Buddenhagen <ossi>Submitted on:Sat 07 Jun 2008 07:54:08 AM UTC
Category:EditorSeverity:3 - Normal
Status:NonePrivacy:Public
Assigned to:NoneOpen/Closed:|Open
Release:current (CVS or snapshot)Operating System:GNU/Linux

Original submission:

mcedit always saves with the original mode of the file, even when 
"save as" is used. this leads to the bizarre situation that even 
after giving a read-only file a new name, it will be still 
read-only. in quick-save mode, this makes the file impossible to 
save after the initial save as.
  1. Merged as [6577100]
  2. Merged as [c769f7f] (with merge [985f076])

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by styx (@styx) on May 25, 2009 at 7:17 UTC (comment 1)

  • Milestone set to future releases

@mc-butler
Copy link
Author

Changed by IMDagger (imdagger@….ru) on Aug 9, 2009 at 14:56 UTC

@mc-butler
Copy link
Author

Changed by IMDagger (imdagger@….ru) on Aug 9, 2009 at 15:08 UTC (comment 2)

  • Cc set to imdagger@….ru
  • Severity set to no branch

@mc-butler
Copy link
Author

Changed by slyfox (@trofi) on Aug 9, 2009 at 15:26 UTC (comment 3)

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

@mc-butler
Copy link
Author

Changed by slyfox (@trofi) on Aug 9, 2009 at 16:24 UTC (comment 4)

  • Votes set to slyfox
  • Severity changed from no branch to on review

Pushed as changese:65771004c4948dd664674e8dee2ddce11786d777 to branch:82_sanitize_ro_file_edition.

Please review.

@mc-butler
Copy link
Author

Changed by slyfox (@trofi) on Aug 9, 2009 at 16:36 UTC (comment 5)

  • Milestone changed from future releases to 4.7.0-pre2

@mc-butler
Copy link
Author

Changed by slyfox (@trofi) on Aug 9, 2009 at 16:37 UTC (comment 6)

Sorry, clickable link: [6577100]

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Aug 9, 2009 at 16:49 UTC (comment 7)

  • Votes changed from slyfox to slyfox iNode
  • Severity changed from on review to approved

@mc-butler
Copy link
Author

Changed by slyfox (@trofi) on Aug 9, 2009 at 16:55 UTC (comment 8)

  • Resolution set to fixed
  • Status changed from accepted to testing
  • Keywords set to commited-master
  • Severity changed from approved to merged
  • Description edited

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Aug 9, 2009 at 19:02 UTC (comment 9)

  • Status changed from testing to closed

@mc-butler
Copy link
Author

Changed by dborca (dborca@….com) on Aug 9, 2009 at 21:17 UTC (comment 10)

  • Resolution fixed deleted
  • Status changed from closed to reopened

This fix is wrong.

Suppose you have two files, foo and bar. Both files have 444 permissions. Now edit foo and "Save". It can't save and instead prompt you to "Save As". Enter bar. It will chmod bar to 644.

If we don't touch touch existing file permissions for "Save", I don't see why we should for "Save As".

Attached is a patch (against 4.7.0-pre1) which adds S_IWUSR only if different_filename and file does not exist yet. For consistency, it's S_IWUSR not S_IWRITE.

@mc-butler
Copy link
Author

Changed by dborca (dborca@….com) on Aug 9, 2009 at 21:17 UTC

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Aug 9, 2009 at 21:21 UTC (comment 11)

you right :)
thank you.

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Aug 9, 2009 at 21:22 UTC (comment 12)

  • Votes slyfox iNode deleted
  • Keywords commited-master deleted
  • Severity changed from merged to on rework

@mc-butler
Copy link
Author

Changed by IMDagger (imdagger@….ru) on Aug 10, 2009 at 8:49 UTC (comment 13)

ok, dborca is right, i forgot that destination file can has 444 permissions too :)

@mc-butler
Copy link
Author

Changed by slyfox (@trofi) on Aug 18, 2009 at 19:29 UTC (comment 14)

  • Severity changed from on rework to on review

Pushed for testing as [c769f7f]

Please review.

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Aug 19, 2009 at 5:09 UTC (comment 15)

  • Votes set to angel_il

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Aug 19, 2009 at 17:33 UTC (comment 16)

  • Votes changed from angel_il to angel_il andrew_b
  • Severity changed from on review to approved

@mc-butler
Copy link
Author

Changed by slyfox (@trofi) on Aug 19, 2009 at 17:51 UTC (comment 17)

  • Description edited
  • Status changed from reopened to closed
  • Severity changed from approved to merged
  • Keywords set to commited-master
  • Resolution set to fixed

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Jan 11, 2014 at 23:01 UTC (comment 18)

  • Description edited
  • Reporter changed from slavazanko to ossi
  • Branch state set to no branch

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jan 12, 2014 at 7:41 UTC (comment 19)

  • Branch state changed from no branch to merged
  • Keywords commited-master deleted
  • Votes changed from angel_il andrew_b to commited-master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress
Development

No branches or pull requests

1 participant