Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#55492 closed defect (fixed)

move: case-only renames fail when no arguments are given

Reported by: ryandesign (Ryan Schmidt) Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone: MacPorts 2.4.3
Component: base Version: 2.4.99
Keywords: Cc: kencu (Ken)
Port:

Description

See https://lists.macports.org/pipermail/macports-dev/2017-December/036965.html

In proc move we have an options variable, but if the caller didn't supply any arguments (e.g. didn't supply -force, which is the only recognized argument), then it's empty. But we still use the empty options variable when calling file rename, which then misinterprets it as the name of a file we want to move.

Change History (8)

comment:1 Changed 3 years ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: newclosed

In acc1e62d8560609652977e563734f805c41244cf/macports-base:

portutil.tcl: Fix case-only renames when no arguments given

Closes: #55492

comment:2 Changed 3 years ago by ryandesign (Ryan Schmidt)

In 29d9709a183c9c8646e45e6ffb658329b73950ba/macports-base:

portutil.tcl: Fix non-case-only renames

Closes: #55495
See: #55492

comment:3 Changed 3 years ago by ryandesign (Ryan Schmidt)

In db2bba84d5e8cd82ec94a19129deb91ef62287bb/macports-base:

portutil.tcl: Fix renames that supply the -force option

Treat $options as a list not as a string.

See: #55492

comment:4 Changed 3 years ago by neverpanic (Clemens Lang)

Milestone: MacPorts Future

comment:5 Changed 3 years ago by raimue (Rainer Müller)

Milestone: MacPorts FutureMacPorts 2.4.3

comment:6 Changed 3 years ago by ryandesign (Ryan Schmidt)

In 6b5f7905cb3173eb334236b38b18eab983d1cc92/macports-base:

portutil.tcl: Fix case-only renames when no arguments given

Closes: #55492
(cherry picked from commit acc1e62d8560609652977e563734f805c41244cf)

comment:7 Changed 3 years ago by ryandesign (Ryan Schmidt)

In a98fe3b89fba99f8bb873663f85a04831718583b/macports-base:

portutil.tcl: Fix non-case-only renames

Closes: #55495
See: #55492
(cherry picked from commit 29d9709a183c9c8646e45e6ffb658329b73950ba)

comment:8 Changed 3 years ago by ryandesign (Ryan Schmidt)

In 47d219119281a5f574ee6298c9e731293bca464e/macports-base:

portutil.tcl: Fix renames that supply the -force option

Treat $options as a list not as a string.

See: #55492
(cherry picked from commit db2bba84d5e8cd82ec94a19129deb91ef62287bb)

Note: See TracTickets for help on using tickets.