shift-F4 creating a new file without an extension passes an extra '.'

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
kwmar
Junior Member
Junior Member
Posts: 3
Joined: 2022-11-02, 19:20 UTC

shift-F4 creating a new file without an extension passes an extra '.'

Post by *kwmar »

shift-F4 creating a new file without an extension passes an extra '.', which I believe is not indended,
since one can actually create file 'foo.' vs 'foo' even on windows.
step to repro, shift-F4, 'foo' => absolute path with 'foo.' is passed to external editor
User avatar
white
Power Member
Power Member
Posts: 4622
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: shift-F4 creating a new file without an extension passes an extra '.'

Post by *white »

It's on purpose.
ghisler(Author) wrote: 2022-05-12, 08:03 UTC Yes, TC adds a dot at the end because otherwise notepad.exe will try to open filename.txt instead of filename when I just pass c:\path\filename to it.
You cannot create files with a dot at the end with normal Windows function calls, you have to use a very specific syntax to bypass the file system checks, which Far must be doing. I'm sorry but i don't think that there is a solution which works with both Far and Notepad.
kwmar
Junior Member
Junior Member
Posts: 3
Joined: 2022-11-02, 19:20 UTC

Re: shift-F4 creating a new file without an extension passes an extra '.'

Post by *kwmar »

ah I see, I'm using a custom editor of mine and it gets confused (treats foo. and foo as different files), so I guess I'll have to work around this in the windows version.
thanks for the explanation
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3295
Joined: 2003-05-06, 11:46 UTC

Re: shift-F4 creating a new file without an extension passes an extra '.'

Post by *Sir_SiLvA »

cant confirm on neither 32 nor 64bit?
on the contrary if I try shift-f4, 'foo.' I only get 'foo' created and opened in editor
Hoecker sie sind raus!
kwmar
Junior Member
Junior Member
Posts: 3
Joined: 2022-11-02, 19:20 UTC

Re: shift-F4 creating a new file without an extension passes an extra '.'

Post by *kwmar »

Sir_SiLvA wrote: 2022-11-02, 20:37 UTC cant confirm on neither 32 nor 64bit?
on the contrary if I try shift-f4, 'foo.' I only get 'foo' created and opened in editor
yes, total commander creates "foo" but passes "abs_path/foo."
this is because of notepad.exe as was explained to me

however it's easy to create "foo.", say using git bash, then touch "foo."
in this case, total commander shows "foo.", but cannot delete it
the file can be deleted again using git bash and rm "foo."
User avatar
white
Power Member
Power Member
Posts: 4622
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: shift-F4 creating a new file without an extension passes an extra '.'

Post by *white »

kwmar wrote: 2022-11-02, 21:42 UTC in this case, total commander shows "foo.", but cannot delete it
Total Commander can delete it since version TC 9.0.
Post Reply