Skip to content

[BUG] Searching for a theme fails when a file exists in CWD with the same name #1889

@aarondill

Description

@aarondill

Rofi version (rofi -v)

Version: 1.7.1 AND Version: 1.7.5

Configuration

N/A

Theme

N/A

Timing report

https://gist.github.com/aarondill/405e6a5811943cbcd84fa6c59c47a8b2

Launch command

rofi -show

Step to reproduce

  1. mkdir -p ~/.config/rofi
  2. make ~/.config/rofi/config.rasi with the contents @theme "theme_name"
  3. touch ~/.config/rofi/theme_name.rasi
  4. Create a file in your CWD with the name theme_name
  5. rofi -show
  6. Observe the failure from rofi (/ was the absolute path):
The following errors were detected when starting rofi:

Failed to open theme: /<HOME>/<USER>/.config/rofi/theme_name
Error: No such file or directory
  1. touch ~/.config/rofi/theme_name (notice no .rasi)
  2. rofi -show
  3. Success. ☹️ This is not supposed to happen.
  4. rm ~/.config/rofi/theme_name
  5. rm ./theme_name
  6. rofi -show
  7. Success 😄

Expected behavior

The presence of a file in your CWD with the name of the theme should not rofi's ability to search XDG_CONFIG_HOME (or other files) for the theme

Actual behavior

A file named the same as the theme in your CWD makes rofi search for the theme without a file extension.

Additional information

This is not an issue with @theme "theme_name.rasi". Since the .rasi extension is never added anyways, theme_name.rasi is correctly found.

Using wayland display server protocol

  • No, I don't use the wayland display server protocol

I've checked if the issue exists in the latest stable release

  • Yes, I have checked the problem exists in the latest stable version

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions