Do

Comment 3 for bug 850543

Revision history for this message
Will Timpson (greybluemist) wrote :

My understanding is that xdg-user-dirs is useful in that it provides a way for any application to find these folders on any system. I am basing this on a cursory reading of: http://www.freedesktop.org/wiki/Software/xdg-user-dirs. I think that I found that some part of Do is coded to read that file in such a way that if it doesn't exist, it fails poorly and the Files and Folders plugin is unusable as a result. I don't really know much about the internals of xdg or gnome-do. I'm just a fellow Do user who had the same problem as you and was inspired by your post to finally figure it out.

I actually just searched the source code (which I found here: http://gnome-do.sourcearchive.com/documentation/0.8.5-1/main.html) until I found the file that contained the line that was throwing the error (http://gnome-do.sourcearchive.com/documentation/0.8.5-1/EnvironmentServiceExtensions_8cs_source.html).
Then I figured that this line: userDirsPath = Path.Combine (configDir, "user-dirs.dirs"); contained the only Path.Combine that was likely to be throwing the error, since it contained an absolute reference (to user-dirs.dirs), while all the rest just referenced variables.
When I discovered that my filesystem did not contain any file named as such, I just searched the tubes for what that file was.

Et voila. (It actually took me an hour or two and I literally did a little dance when I figured it out.)

P.S. I'm no developer, but if there are developers reading this, it seems to me that there should be a better way of doing this. Does the Files and Folders plugin (or the code in Do that the plugin is using) need to read the user-dirs.dirs file to be useful? If not, there should be a way to code it so that it can be used if available, but the remaining functionality of Files and Folders is maintained in its absence. If it is necessary, then xdg-user-dirs should be a dependency of Do (or maybe the plugins?), so that user-dirs.dirs is available to Do when it is needed (I realize that in this case, it is more of a packaging problem). Any thoughts?