This is fixed in xdg-utils 1.1.3-2. A merge request has been filed LP:
#1869492.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to xdg-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1848335

Title:
  xdg-open (and others) don't handle spaces in directory names properly

Status in xdg-utils package in Ubuntu:
  New

Bug description:
  Description:  Ubuntu 18.04.3 LTS
  Release:      18.04
  xdg-utils: Installed: 1.1.2-1ubuntu2.3

  Environment:
  Shell: bash/fish (happens in both)
  DE: i3
  env:
  
XDG_DATA_DIRS=/home/barnex/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share/:/usr/share/i3:/home/barnex/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop
  XDG_CONFIG_DIRS=/etc/xdg/xdg-i3:/etc/xdg
   
  What I did:
  xdg-open "http://reddit.com"; # while having a specific directory structure

  What I expected to happen:
  Open a new tab/window of my browser with the correct URL.

  What happened instead:
  xdg-open froze, and eventually crashed.

  I believe this issue in upstream caused the erratic behavior:
  https://gitlab.freedesktop.org/xdg/xdg-utils/issues/131

  xdg-utils seems to recursively look through directories for the
  .desktop file. In my setup this path includes a directory:

  "/home/barnex/.local/share/applications//wine//Programs//Zone.com
  Deluxe Games/"

  Instead of correctly looking into this directory, the next
  search_desktop_file call goes into the "/home/barnex/Games" - a
  directory outside of the search path.

  /home/barnex/Games in turn has a directory "/home/barnex/Games//epic-
  games-store//dosdevices//c://users//barnex//My Music/" - which again
  has a space, and thus makes the xdg-open go to "/home/barnex/Music" -
  another directory outside of my search path.

  In /home/barnex/Music there's a directory called ' The Final Boss -
  James Harmon - [Ambient - Breakbeat - Lo-Fi -Electronica] [2011]' -
  this just causes an infinite loop of adding more slashes to the path,
  resulting in calls like:

  + search_desktop_file chromium-browser.desktop
  
Music////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  The Final Boss - James Harmon - [Ambient - Breakbeat - Lo-Fi
  -Electronica] [2011]/ http://reddit.com

  This eventually leads to a crash.

  Running 'xdg-settings get default-url-scheme-handler' with no
  arguments caused a similar behavior.

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: xdg-utils 1.1.2-1ubuntu2.3
  ProcVersionSignature: Ubuntu 4.15.0-66.75-generic 4.15.18
  Uname: Linux 4.15.0-66-generic x86_64
  NonfreeKernelModules: nvidia_modeset nvidia
  ApportVersion: 2.20.9-0ubuntu7.7
  Architecture: amd64
  CurrentDesktop: i3
  Date: Wed Oct 16 13:45:35 2019
  InstallationDate: Installed on 2016-11-20 (1059 days ago)
  InstallationMedia: Ubuntu-Server 16.10 "Yakkety Yak" - Release amd64 
(20161012.1)
  PackageArchitecture: all
  SourcePackage: xdg-utils
  UpgradeStatus: Upgraded to bionic on 2019-01-23 (265 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/1848335/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to