SMB Doesn’t Provide Usable Path
- Dominant language
- Vala
- Stars
- 365
- Forks
- 82
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 3
Description
## What Happened?
If you click on the breadcrumbs at the top of the window in Files, for most directories you will get a usable path that you can copy and paste or edit. Additionally, for most items in Files, if you drag the item to a Terminal window, it will fill a usable path for that item.
For remote SMB locations, though, if you click on the breadcrumbs, you get something like the following:
```
smb://hostname.local/path/to/directory
```
And if you drag an SMB item from Files to Terminal, you get something like the following:
```
'/run/user/1000/gvfs/smb-share:server=macmini.local,share=path/to/item’
```
Neither of these strings are usable with, for example, `cp`, `mv`, `rm`, `rsync`, etc. (I discovered this when trying to use `rsync` to mirror a local directory onto a remote SMB share.)
## Steps to Reproduce
1. Connect to an SMB server in Files.
2. Click on the breadcrumbs at the top of the window or drag an item from the Files window with the server to a Terminal window.
## Expected Behavior
Clicking on the breadcrumbs or dragging an item from a Files window should provide a usable path. For comparison, if you open a remote share in Finder on macOS and drag it to the macOS Terminal, you will get something like `/Volumes/sharename/path/to/item`, which is to say the remote share gets mounted to the local filesystem with something along the lines of FUSE. (Yes, I know you don’t like comparisons to macOS, but it’s the other platform I’m most familiar with, and in the case their implementation is more functional, which isn’t always the case.) I don’t remember how remote locations are handled on GNOME or Ubuntu, but just in general it would be most useful to provide a usable path to any item shown in Files, especially if you drag it to Terminal.
I know there are certain cases where the breadcrumbs can’t feasibly show an actual path, such as `recent:///`—though hypothetically even that could be implemented as a mount—but even where it wouldn’t make sense for the breadcrumbs to show an actual path, dragging an item onto a Terminal window should provide a usable path for that item. I just checked, and if you drag an item from `recent:///` onto a Terminal window, it does provide a normal path to that item (the item’s actual location). `recent:///` doesn’t seem to support items on remote SMB shares, though, which is probably related to the fact that remote SMB shares don’t get mounted in the local filesystem.
I’m not hugely familiar with how GVFS works, but some GVFS locations would probably work better if they also used FUSE, or something like that.
## OS Version
6.x (Odin)
## Software Version
Latest release (I have run all updates)
## Log Output
_No response_
## Hardware Info
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.