From: Jiri Denemark Date: Wed, 28 May 2025 14:34:18 +0000 (+0200) Subject: util: Document limitation of virFileCanonicalizePath X-Git-Tag: v11.5.0-rc1~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee4231ae67eab1ddb5054cfa39dced5ebd4ce6d4;p=thirdparty%2Flibvirt.git util: Document limitation of virFileCanonicalizePath On most platforms virFileCanonicalizePath is implemented using realpath(), which only works on existing paths. Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- diff --git a/src/util/virfile.c b/src/util/virfile.c index 7cab3d0cd6..242aa7ff88 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -3408,7 +3408,8 @@ virFileSanitizePath(const char *path) /** * virFileCanonicalizePath: * - * Returns the canonical representation of @path. + * Returns the canonical representation of @path. This function is only + * guaranteed to work when @path exists. It may return NULL otherwise. * * The returned string must be freed after use. */