[Far Manager 0004050]: wrong quoted path substitute

4 views
Skip to first unread message

Mantis Bug Tracker

unread,
Aug 24, 2024, 7:41:47 AM8/24/24
to far...@googlegroups.com
The following issue has been SUBMITTED.
======================================================================
<a target="_blank"
href="https://bugs.farmanager.com/view.php?id=4050">https://bugs.farmanager.com/view.php?id=4050</a>

======================================================================
Reported By: mil_alex
Assigned To:
======================================================================
Project: Far Manager
Issue ID: 4050
Category: Special Symbols
Tags: user menu;special characters
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Build:
======================================================================
Date Submitted: 2024-08-24 12:41 BST
Last Modified: 2024-08-24 12:41 BST
======================================================================
Summary: wrong quoted path substitute
Description:
Hi. I'm using a my own command line Win32 exe utility via F2 user menu from Far
3.0.6300.0 x64 Win 7 x64

I need to pass the inactive panel path to the utility command line with optional
keys, so I wrote first

cdel32.exe !#!\ -all

!\ means current path and !# means it for inactive Far panel

that works fine for paths without a space char inside.

when the path includes space characters like d:\telegram\telegram video\my cat
then macros !#!\ is replaced exactly with this string and breaks at every space
found

so my utility gets 3 extra parameters instead of a single path string

I tried to work this out by adding quotes before and after the path macros:

cdel32.exe "!#!\" -all

I thought it would substitute the path with quotes and next pass the -all
option.
however this way Far passed me the path padded by quote sign and -all too.
d:\telegram\telegram video\my cat" -all

that is, leading quota has been stripped and everything the rest is passed as a
single command line parameter which is obviously wrong.

should be
cdel32.exe "d:\telegram\telegram video\my cat" -all

I guess the \" has some higher priority and broke the logic of substitute

Steps to Reproduce:
call F2 user menu
add any call of a command line executable with "!#!\" special symbols

the expected behavior is a quoted path of an inactive Far panel

wrong behavior is a path padded with ending quote sign and everything up to the
end of menu string

======================================================================

Issue History
Date Modified Username Field Change
======================================================================
2024-08-24 12:41 mil_alex New Issue
2024-08-24 12:41 mil_alex Tag Attached: user menu;special characters

======================================================================

Reply all
Reply to author
Forward
0 new messages