Page 1 of 1

"init variable file list" contains directories?

Posted: 29 Sep 2015 04:51
by dewalist
Hi all.

I made a quick-and-dirty wallpaper changer using two flows - one to set the files to a variable, the other to set the wallpaper.

However, at least a few times per day I get an error: "open failed: EISDIR (Is a directory)". Is the "init variable file list" function including directories when it should only contain files? Or is there some other issue? The only thing I can think of to get around this is to script an if condition to capture that error...

Thanks!

Re: "init variable file list" contains directories?

Posted: 29 Sep 2015 13:11
by Martin
Hi,

Yes, the list also contains directories. You could use a pattern like /storage/emulated/0/*.jpg to limit the list to jpg files or /storage/emulated/0/*.jpg,/storage/emulated/0/*.png to list different types of images.

Regards,
Martin

Re: "init variable file list" contains directories?

Posted: 29 Sep 2015 20:22
by dewalist
Ahh, great suggestion, and a quick response - thanks Martin!