FaaSr / FaaSr-package

Function-as-a-Service package for R
https://faasr.io
Other
4 stars 8 forks source link

fix(paths): Preserve leading slash in local absolute paths #120

Open Ashish-Ramrakhiani opened 1 week ago

Ashish-Ramrakhiani commented 1 week ago

Bug: Leading slash incorrectly trimmed from local absolute paths

Description

The preprocessing step in faasr_get_file and faasr_put_file functions incorrectly trims leading slashes from local folder paths, which can break functionality when using absolute paths.

Current Behavior

When providing an absolute path in local_folder:

local_folder <- "/tmp/xyz"
# After preprocessing
local_folder becomes "tmp/xyz"  # Leading slash removed

Expected Behavior

local_folder <- "/tmp/xyz"
# After preprocessing
local_folder should remain "/tmp/xyz"  # Leading slash preserved

# For multiple leading slashes
local_folder <- "///tmp/xyz"
# Should normalize to
local_folder becomes "/tmp/xyz"  # Single leading slash preserved