What happened?
When creating or importing profiles from S3, a literal / folder (empty folder name) is created in the S3 bucket, causing profiles to be stored at paths like s3://bucket//profile-name/ instead of s3://bucket/profile-name/.
This is due to the way url.pathname is used in the code, resulting in an empty or slash-only prefix being accidentally interpreted as part of the path. Specifically, packages/driver-lightsail/src/fs/index.ts uses url.pathname directly as the path, which becomes / when no path is provided, and then path.posix.join(prefix, filename) creates a double slash.
Suggested Fix: Normalize the path to treat / as empty and trim leading/trailing slashes.
Add screenshots

Steps to reproduce the behavior
- Create a profile with S3 storage:
preevy profile create my-profile 's3://my-bucket/my-profile?region=us-east-1'
- Check S3 bucket contents
- Observe a
/ folder containing my-profile/ instead of my-profile/ at the root
Expected behavior
Profile should be stored at s3://bucket/my-profile/, not at s3://bucket//my-profile/.
What OS are you seeing the problem on?
MacOS
Additional context
Preevy version: [check with preevy version]
OS: macOS
Cloud provider: AWS Lightsail + S3
File: packages/driver-lightsail/src/fs/index.ts (see parseS3Url and usage of url.pathname)
Record
What happened?
When creating or importing profiles from S3, a literal
/folder (empty folder name) is created in the S3 bucket, causing profiles to be stored at paths likes3://bucket//profile-name/instead ofs3://bucket/profile-name/.This is due to the way
url.pathnameis used in the code, resulting in an empty or slash-only prefix being accidentally interpreted as part of the path. Specifically,packages/driver-lightsail/src/fs/index.tsusesurl.pathnamedirectly as thepath, which becomes/when no path is provided, and thenpath.posix.join(prefix, filename)creates a double slash.Suggested Fix: Normalize the path to treat
/as empty and trim leading/trailing slashes.Add screenshots
Steps to reproduce the behavior
preevy profile create my-profile 's3://my-bucket/my-profile?region=us-east-1'/folder containingmy-profile/instead ofmy-profile/at the rootExpected behavior
Profile should be stored at
s3://bucket/my-profile/, not ats3://bucket//my-profile/.What OS are you seeing the problem on?
MacOS
Additional context
Preevy version: [check with
preevy version]OS: macOS
Cloud provider: AWS Lightsail + S3
File:
packages/driver-lightsail/src/fs/index.ts(seeparseS3Urland usage ofurl.pathname)Record