file name containing spaces aren't properly handled
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 5
- Joined: 2012-07-29, 09:33 UTC
file name containing spaces aren't properly handled
when an external viewer is called. File names shall be escaped before calling an external application otherwise they aren't interpreted as one parameter but many.
this very old bug aren't getting fixed for years as I see and I was too lazy to register on this damn board that doesn't accept gmail accounts.
this very old bug aren't getting fixed for years as I see and I was too lazy to register on this damn board that doesn't accept gmail accounts.
2fixdamnbug
I don't have that problem either.
How do you call the external viewer, and wich viewer(s) is it?
I don't have that problem either.
How do you call the external viewer, and wich viewer(s) is it?
It is actually the other way around - gmail accounts doesn't accept mails from this board, that is why they are disabled.this damn board that doesn't accept gmail accounts.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
fixdamnbug, all names with spaces must be enclosed with double quotes. I tested it just now with Notepad.exe as an external viewer (have chosen its path in configuration dialog), TC passes correct quoted name if path contains spaces, so I can't confirm any bug here. So petermad's question is correct - which viewer do you use?
Re: file name containing spaces aren't properly handled
Sorry but I think you are the only one having such a problem.fixdamnbug wrote:when an external viewer is called. File names shall be escaped before calling an external application otherwise they aren't interpreted as one parameter but many.
this very old bug aren't getting fixed for years as I see and I was too lazy to register on this damn board that doesn't accept gmail accounts.
I've used external viewers since many years and never had any problem with file names or path containing spaces. Currently I've configired Universal viewer for this.
Not always true.MVV wrote:TC passes correct quoted name if path contains spaces...
E.g. if you call Notepad with commandline parameter
Code: Select all
C:\Windows\notepad.exe /A
But one may easily work around this by explicitly qouting the parameter:
Code: Select all
C:\Windows\notepad.exe /A "%1"
Holger
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
This happens because TC tries to detect whether the configured editor is 16-bit or 32-bit. This function fails because of the extra parameter, therefore TC assumes that it's a 32-bit program, and passes the short 8.3 name to it.if you call Notepad with commandline parameter
Code:
C:\Windows\notepad.exe /A
the filepath parameter is given as short name without quotes.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Some thoughts:ghisler(Author) wrote: This happens because TC tries to detect whether the configured editor is 16-bit or 32-bit. This function fails because of the extra parameter, therefore TC assumes that it's a 32-bit program, and passes the short 8.3 name to it.
- Isn't it the other way around: "Short names for 16 bit applications"?
- Are there any 16 bit applications usable under 64 bit Windows?
- What happens if the user set "NtfsDisable8dot3NameCreation" to 1?
Just tested the last point with Win7 x64 virtual machine and TC8.0 x64:
"File not found" because the filename wasn't quoted.
Regards
Holger
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Forgot to mention that i did the previous test with the following external viewer configuration:ghisler(Author) wrote:This isn't TC's fault. Use a better editor.
Code: Select all
%COMMANDER_PATH%\Totalcmd.exe /N /S=L

Anyway, as mentioned before the user can fix it:
Code: Select all
%COMMANDER_PATH%\Totalcmd.exe /N /S=L "%1"
Holger
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The above should still work with the 8.3 name, though...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Indeed when you disable 8.3 names, you have to use the "%1" parameter explicitly, or an editor without parameters.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Junior Member
- Posts: 5
- Joined: 2012-07-29, 09:33 UTC
please take a look at this damn picture and tell me what would be the right syntax to make it work with filenames with spaces
HERE SHOULD BE THE LINK TO THE DAMN PICTURE BUT
In order to try to prevent spammers, we do not allow our users to post URLs in any form until they have posted at least 1 legitimate posts and have been with us for more than 1 days. We appreciate your understanding in this matter in order to help us eliminate spam from this forum. If you have somehow gotten this message even though you meet both of the criteria, please let us know ASAP.
HERE SHOULD BE THE LINK TO THE DAMN PICTURE BUT
In order to try to prevent spammers, we do not allow our users to post URLs in any form until they have posted at least 1 legitimate posts and have been with us for more than 1 days. We appreciate your understanding in this matter in order to help us eliminate spam from this forum. If you have somehow gotten this message even though you meet both of the criteria, please let us know ASAP.
-
- Junior Member
- Posts: 5
- Joined: 2012-07-29, 09:33 UTC