From: Oleg Broytman Date: Fri, 20 May 2016 07:57:10 +0000 (+0300) Subject: Encode file name to filesystem encoding X-Git-Tag: 5.0.2~1 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=b20fb654e4b89e7891e928c1c6f9d67a937b1004;p=xsetbg.git Encode file name to filesystem encoding --- diff --git a/xsetbg.py b/xsetbg.py index 2658956..98b8aaa 100644 --- a/xsetbg.py +++ b/xsetbg.py @@ -81,6 +81,7 @@ if xsetbg_db.select('last_shown IS NULL OR last_shown < %d' % error("No unshown images found. Run rescan_fs.py " "or decrease min_delay. Abort.") +fs_encoding = xsetbg_conf.get("images", "fs_encoding") def change(force=False): # Use the program's file as the lock file: @@ -121,7 +122,7 @@ def change(force=False): program_options = ["xli", "-border", random.choice(borders), "-center", "-onroot", "-quiet", "-zoom", "auto", - row.full_name] + row.full_name.encode(fs_encoding)] rc = subprocess.call(program_options) if rc: