Ticket #3824 (new defect)

Opened 8 years ago

Last modified 7 years ago

Quick cd is relative in panelization

Reported by: andrew_b 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

On panelized panel, the "Quick cd" command is always relative to panel working directory, even cd to absolute path.

How to reproduce:

  1. Assume, CWD of panel is ~/work.c/mc/3780_cleanup.
  2. Find something in the current panel.
  3. Panelize the find result.
  4. Run "Quick cd" command (alt-c), type / to cd to root directory, press Enter.

Result: you are in ~/work.c/mc/3780_cleanup.
Expected result: you are in /.

Change History

comment:1 follow-up: ↓ 2 Changed 7 years ago by andrew_b

The bug was introduced in [4dde82c5be5cef84eb7f41c1083e5b521eb22a9e].

Since vfs_path_t is an absolute path, previous test

_new_dir[0] == '.' && _new_dir[1] == '.' && _new_dir[2] == 0

and current one

vfs_path_equal_len (new_dir_vpath, panelized_panel.root_vpath, new_vpath_len)

are not equivalent.

Current test must be fixed to restore previous logic: new_dir_vpath is the parent directory for panelized_panel.root_vpath.

Version 0, edited 7 years ago by andrew_b (next)

comment:2 in reply to: ↑ 1 Changed 7 years ago by mooffie

The bug was introduced in [4dde82c5b].

Since vfs_path_t is an absolute path, previous test

_new_dir[0] == '.' && _new_dir[1] == '.' && _new_dir[2] == 0

[...]


I was aware of this. This is one of the panelization bugs I promised to open tickets for.

Much, if not all, of the panelization code was committed without code-review and without documentation. (The result proves the failure of the Sapienti sat doctrine.) #3767 was intended as the 1st in a series of tickets for cleaning up the panelization system. I'm planning to get back to it.

Note: See TracTickets for help on using tickets.