-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Migrate and enhance the path validation logic from system/utils to the new internal/platform package. This function is required to safely handle user inputs before backup operations.
Requirements:
- Create File:
internal/platform/paths.go - Functionality: Implement
VerifyInputPath(rawPath string) (string, error)which must:
-- Sanitize input strings (remove quotes/whitespace).
-- Expand tilde (~) to the home directory.
-- Resolve to an absolute path.
-- Confirm the file exists on disk (return error if missing).
Usage Scope:
- WHERE TO USE: Strictly for Backup/Ingestion (e.g., validating custom key paths from CLI during ssh/gpg backup).
- WHERE NOT TO USE: Do not use for Restoration targets (files that don't exist yet).