Skip to content

Commit

Permalink
portunarchive: delete any existing destroot first
Browse files Browse the repository at this point in the history
Copy semantics would create a subdir if the target already exists.
  • Loading branch information
jmroot committed Oct 3, 2024
1 parent c219570 commit dd194bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/package1.0/portunarchive.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,10 @@ proc portunarchive::unarchive_main {args} {
}
} else {
ui_info "$UI_PREFIX [format [msgcat::mc "Copying %s to destroot"] ${unarchive.file}]"
copy -force ${unarchive.path} ${unarchive.dir}
if {[file exists ${unarchive.dir}]} {
delete ${unarchive.dir}
}
copy ${unarchive.path} ${unarchive.dir}
}

return 0
Expand Down

0 comments on commit dd194bd

Please sign in to comment.