mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-03 16:41:26 +01:00
fix(fuse,cli): let rm, rename and mkdir take paths in on-demand folders
`pdfs rm ~/Downloads/x` answered "is not under the mountpoint" while `pdfs move` took the same path: the Delete, Rename and CreateFolder handlers still read paths against the primary mount only (B88). They now go through `route_change`, the router ResolveConflict already used, renamed from `route_conflict`. It answers the request in the inode space of the mount that owns the path. An on-demand folder's root has a parent on Drive, so `pdfs rm ~/Downloads` would have trashed the whole synced folder from under its mount. rm and rename refuse a path that names a mount's root.
This commit is contained in:
1 parent
c64252193f
commit
eb53d122cc
3 files changed
+89
-31
No files matched your search
@@ -285,7 +285,8 @@ enum Command {
|
||||
},
|
||||
/// Rename a file or folder via the running daemon.
|
||||
Rename {
|
||||
/// File/folder path, inside the mountpoint or relative to it.
|
||||
/// File/folder path, inside My files or an on-demand synced folder, or
|
||||
/// relative to the mountpoint.
|
||||
path: PathBuf,
|
||||
/// New name (a single path component).
|
||||
new_name: String,
|
||||
@@ -304,12 +305,14 @@ enum Command {
|
||||
},
|
||||
/// Trash a file or folder via the running daemon.
|
||||
Rm {
|
||||
/// File/folder path, inside the mountpoint or relative to it.
|
||||
/// File/folder path, inside My files or an on-demand synced folder, or
|
||||
/// relative to the mountpoint.
|
||||
path: PathBuf,
|
||||
},
|
||||
/// Create a folder via the running daemon.
|
||||
Mkdir {
|
||||
/// Parent folder path, inside the mountpoint or relative to it.
|
||||
/// Parent folder path, inside My files or an on-demand synced folder,
|
||||
/// or relative to the mountpoint.
|
||||
parent: PathBuf,
|
||||
/// New folder name (a single path component).
|
||||
name: String,
|
||||
|
||||
Reference in new issue
Block a user