Ticket #1989 (new defect)

Opened 15 years ago

Last modified 13 years ago

Improper creation of the file archive from the directory containing the "\" in the name

Reported by: pavlinux Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Improper creation of the file archive from the directory containing the "\" in the name

Eample:

# mkdir 'TEst\n Dir\r X'
# ls
TEst\n Dir\r X
# cd 'TEst\n Dir\r X'
# pwd
/tmp/TEST/TEst\n Dir\r X
# mc
# <F2>

Сompress the current subdirectory (tar.gz)

<ENTER><ENTER>

# cd ..
# ls
TEstn Dirr X.tar.bz

but need TEst\n Dir\r X.tar.bz

Attachments

mc.menu (1.9 KB) - added by pavlinux 15 years ago.
patch
mc.menu.diff (1.8 KB) - added by pavlinux 15 years ago.

Change History

Changed 15 years ago by pavlinux

patch

comment:2 Changed 15 years ago by pavlinux

http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_170
http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_12

A pathname consisting of a single <slash> shall resolve to the root directory of the process. A null pathname shall not be successfully resolved. A pathname that begins with two successive <slash> characters may be interpreted in an implementation-defined manner, although more than two leading <slash> characters shall be treated as a single <slash> character.

Changed 15 years ago by pavlinux

comment:3 Changed 15 years ago by storchaka

Use $(basename %d /).

comment:4 Changed 13 years ago by andrew_b

  • Version changed from version not selected to master
  • Branch state set to no branch
  • Milestone changed from 4.7 to Future Releases
Note: See TracTickets for help on using tickets.