hang with reserved file names

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
mhanor
Junior Member
Junior Member
Posts: 22
Joined: 2010-04-07, 11:04 UTC

hang with reserved file names

Post by *mhanor »

Hello,

Total Commander (8.51a x64) hangs while trying to access files with special names, such as aux, com1, no matter if it has an extension or not. In my case, the PC does have a COM1 port. After disabling my COM1 port, it only trigger a "File not found" message, when trying to open it.
Perhaps it should be best to check for such names, before trying to open them.

http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29#naming_conventions

You can create such files with cygwin. I've encountered the issue while searching through the linux kernel source folder tree. There's an "aux.c" file in there.

OS: Windows 7 x64 SP1
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Re: hang with reserved file names

Post by *milo1012 »

mhanor wrote:You can create such files with cygwin.
Well, there's your problem.

Cygwin is a POSIX layer.
Just because these files can exist doesn't mean that TC should handle them like normal files.
You can do some special things with them, even with today's Windows. See e.g. here.

There you can also find a solution for how to rename/move such files,
and you should also look at this old reply:
It's not a bug, it's a feature!
TC plugins: PCREsearch and RegXtract
mhanor
Junior Member
Junior Member
Posts: 22
Joined: 2010-04-07, 11:04 UTC

Post by *mhanor »

All I'm saying, if it can't use them, then it shouldn't try to open them. A well designed program will avoid situations that renders it unusable.

For example, the Windows "more" utility don't hang. It just gives an error, that it can't open \\.\aux
But the same utility can open the right file, when giving a full UNC path:

Code: Select all

more \\.\C:\cygwin\home\user\linux-3.12.8\drivers\gpu\drm\nouveau\core\subdev\i2c\aux.c
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50549
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry but TC doesn't check for special devices when a file really exists. It's not TC's problem that you created a file this way.
Author of Total Commander
https://www.ghisler.com
Post Reply