From: Kevin Day Date: Mon, 17 Nov 2025 02:28:30 +0000 (-0600) Subject: Update: Ensure the controller_path_canonical_relative() resets the destination used. X-Git-Tag: 0.7.3~7 X-Git-Url: https://www.git.kevux.org/?a=commitdiff_plain;h=51b91330486fd47c81f3212fea8a7b1068edb0bd;p=controller Update: Ensure the controller_path_canonical_relative() resets the destination used. The canonical function does not guarantee the destination used value to be set to 0. Ensue that this value is set, if possible. Update the documentation comment to communicate that the destination is not appended to and is instead replaced by. --- diff --git a/sources/c/program/controller/main/path.c b/sources/c/program/controller/main/path.c index 50b1c52..c86ac48 100644 --- a/sources/c/program/controller/main/path.c +++ b/sources/c/program/controller/main/path.c @@ -9,6 +9,8 @@ extern "C" { if (!main || !destination) return F_status_set_error(F_parameter); + destination->used = 0; + { const f_status_t status = fl_path_canonical(source, destination); if (F_status_is_error(status)) return status; diff --git a/sources/c/program/controller/main/path.h b/sources/c/program/controller/main/path.h index d8d2426..8381231 100644 --- a/sources/c/program/controller/main/path.h +++ b/sources/c/program/controller/main/path.h @@ -40,6 +40,8 @@ extern "C" { * The resulting relative canonical path. * The destination will be completely replaced on success. * + * Any existing values will be replaced. + * * Must not be NULL. * * @return