SiaFoundation / renterd

A renter for Sia
https://sia.tech/software/renterd
MIT License
62 stars 18 forks source link

renaming the full path not just the current filename #1315

Open toddfries opened 2 weeks ago

toddfries commented 2 weeks ago

Description

'rename' to a different path (within the same bucket I expect possible, to a different bucket may be more problematic)

Version

v1.0.7-beta.2-250-g21694eea

What operating system are you running (e.g. Ubuntu 22.04, macOS, Windows 11)?

Linux 6.1.0-21-amd64 Debian 6.1.90-1 (2024-05-03)

Anything else?

It's so easy to upload a file with scripts incorectly till scripts are vetted. I had copied a file to 'sia-test:zfs-snaps/foo.gz/foo.gz' and wanted to have it renamed to 'sia-test:zfs-snaps/foo.gz' .. ended up doing it in 2 parts, 'rclone move sia-test:zfs-snaps/foo.gz/foo.gz sia-test:zfs-snaps/foo.gz.1' then 'rclone move sia-test:zfs-snaps/foo.gz.1 sia-test:zfs-snaps/foo.gz' since moving it directly to the path I wanted detected a dir node 😭

ChrisSchinnerl commented 2 weeks ago

Are you referring to the API or UI? Renaming within a bucket is supported in the API. Theoretically you should also be able to do so in the UI by adding slashes to the name that you rename to.