swaywm / swaylock

Screen locker for Wayland
MIT License
853 stars 201 forks source link

Unable to load images containing ":" even after prefixing "::" #373

Closed lluises closed 2 months ago

lluises commented 2 months ago

Problem

There is no way to use ":" in an image path.

The MAN page says:

if the path potentially contains a ':', prefix it with another ':' to prevent interpreting part of it as .

However this mechanism is not working as intended. I tried the same image with a ":" free path, and containg ":". Despite prefixing ("::"), there is no way to get the image that contains ":" to be recognized, and I get the following error message:

[background-image.c:30] Failed to load background image (Failed to open file “:b.jpg”: No such file or directory).

Affected versions

The latest development version, commit cca2436ba535d17c49b7d7ba75ebfa6a18ec9209 is affected.

Steps to reproduce

  1. Name a file a.jpg
  2. cp a.jpg a:b.jpg Then, If you run swaylock -i a.jpg it will work just fine. But if you try swaylock -i a:b.jpg or swaylock -i a::b.jpg it will fail.

Expected result

Acording to the MAN page, running swaylock -i a::b.jpg should be valid.

lluises commented 2 months ago

Never mind. I am stupid. Using swaylock -i :a:b.jpg does work. I just did not understood the MAN page o.O

I am sorry for the trouble.