SiaFoundation / renterd

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

renaming the full path not just the current filename #1315

Open toddfries opened 5 months ago

toddfries commented 5 months 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 5 months 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.