[Nautilus/Files] SFTP network folder error outside of happy path

Hello everyone! :waving_hand:

I’m experiencing an issue where SFTP mounts from the Network tab fail to open in certain scenarios outside of the usual happy path. :rainbow:

The error message when trying to open it is:

Could Not Display ""
The file is of an unknown type

Screenshot of issue:

Steps to reproduce:

  1. Create an SSH config in ~/.ssh/config like:
Host myhost
  Hostname host.domain.tld
  User myuser
  IdentityFile ~/.ssh/mykey
  1. From Files > Network tab > type server address as sftp://myhost.
  2. The network location is opened at path sftp://myhost/home/myuser. Navigate to path sftp://myhost/.
  3. Press the eject icon from the left-side menu.
  4. From Files > Network tab > Previous > try to open the saved SFTP location again and it fails with the aforementioned error.

Issue is related to the remote root filesystem path /. Ejecting (unmounting) from any other remote FS path does not produce issue. Issue disappears after exiting and reopening Nautilus.

System info:

pavin@suse-pc:~> nautilus --version
GNOME nautilus 50.3.1
pavin@suse-pc:~> mutter --version
mutter 50.5
pavin@suse-pc:~> gnome-shell --version
GNOME Shell 50.5

Sorry if this was reported previously, I could not find it! :face_in_clouds: