Closed sg-s closed 8 years ago
Can you try setting a wallpaper through System Preferences and see if it's still a folder? OS X version?
hi, i did set the wallpaper using System Preferences. I'm on Mac OS X 10.10.3. node: v0.12.2
ah ha! i misunderstood your question — it is set to a folder in System Preferences. But shouldn't the expected behaviour be to return the path to the current wallpaper?
Ah, right. Was able reproduce it now when I selected "Change picture". The problem is that I'm using the blessed OS X API to get the wallpaper, so not sure there's much to do about it. I agree it's suboptimal.
I made this mainly for being able to set the wallpaper though, and just added a getter for convenience.
I'd say PR welcome here, but not a priority for me.
Seems like this returns the correct wallpaper, though would prefer an Objective-C solution:
tell application "Finder" to POSIX path of (desktop picture as alias)
Another lead: http://stackoverflow.com/questions/14099363/get-the-current-wallpaper-in-cocoa
thanks — i guess it's too complicated for now
running
wallpaper
returns the path of the folder that contains the current wallpaper, instead of the path to the actual file.this issue is true whether or not multiple desktops are enabled.