Ticket #12 (new defect) — at Initial Version

Opened 15 years ago

Last modified 10 years ago

savannah: Open a symlink to edit when save, erase symlink and make a new file.

Reported by: slavazanko Owned by:
Priority: minor Milestone:
Component: mcedit Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

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

Submitted by:NoneSubmitted on:Sun 15 May 2005 10:19:33 PM UTC
Category:EditorSeverity:3 - Normal
Status:Need InfoPrivacy:Public
Assigned to:NoneOpen/Closed:Open
Release:4.6.0Operating System:GNU/Linux

Discussion:

Mon 16 May 2005 04:39:27 PM UTC, comment #6:

> Weird. I cannot reproduce this on FC1 with MC_4_6_1_PRE from a 
couple of days ago. Where did you get this pre4 so I can compare?


I cannot remember, official places to find mc tarballs are still 
obscure to me. But IIRC it was from a "official" location as well as
previous mc version I've been using.

> Can you reproduce this with mc-4.6.1-0.14.FC3 (pre3 with patches) 
or latest MC_4_6_1_PRE?


I reproduce it at least w/ mc-4.6.1a-0.8 (FC3 rpm). Let me know if 
other tests are necessary (just seen Oswald's post, BTW it's right 
that "Safe save" was set in my settings).

> Is it reproducible for non 0 byte files?


Yes it is.

> Could this be a kernel issue?


I would say no, since I face this behaviour for years (kernels 
2.4.x, up to 2.6.11).
	Anonymous
Mon 16 May 2005 04:27:32 PM UTC, comment #5:

F9 -> options -> save mode -> switch to "quick save"
and everything is fine ...

it might be worth consideration, though, to make the "safe save" and
"do backups" modes follow symlinks.
	Oswald Buddenhagen <ossi>
Mon 16 May 2005 04:11:23 PM UTC, comment #4:

Weird. I cannot reproduce this on FC1 with MC_4_6_1_PRE from a 
couple of days ago. Where did you get this pre4 so I can compare?

Can you reproduce this with mc-4.6.1-0.14.FC3 (pre3 with patches) or
latest MC_4_6_1_PRE? Is it reproducible for non 0 byte files? Could 
this be a kernel issue?
	Leonard den Ottolander <leonardjo>
Project Member
Mon 16 May 2005 03:12:51 PM UTC, comment #3:

GNU/Linux x86, FC3 running mc 4.6.1-pre4 from the sources (was: SuSE
8.x, mc 4.6.x from the sources and older mc versions):

$ rm -f foo bar; touch foo; ln -s foo bar; ls -l foo bar

lrwxrwxrwx 1 wwp users 3 May 16 17:08 bar -> foo
-rw-r--r-- 1 wwp users 0 May 16 17:08 foo

$ mcedit bar
(press F2 then F10)

$ ls -l foo bar

   1. -rw-r--r-- 1 wwp users 0 May 16 17:09 bar
   2. -rw-r--r-- 1 wwp users 0 May 16 17:08 foo

as you see, bar is no longer a symlink but a regular file.
	wwp <wwp>
Mon 16 May 2005 02:59:24 PM UTC, comment #2:

? Could you provide a little more info (platform, example)?

$ mcedit foo
$ ln -s foo bar
$ mcedit bar

just edits foo for me (also tried this with 4.6.0). Or am I missing 
your point?
	Leonard den Ottolander <leonardjo>
Project Member
Sun 15 May 2005 10:41:59 PM UTC, comment #1:

I do my best to avoid this behaviour in mc for years :-\ (now w/ 
4.6.1-pre4a). I hope it's not by design that mc replaces an edited 
symlink w/ the target file when saving/editing it!
	wwp <wwp>
Sun 15 May 2005 10:19:33 PM UTC, original submission:

Open a file by symlink to edit, when close to save changes, MC erase
symlink and make a new file. (Erase the symlink)
Note: See TracTickets for help on using tickets.