Bug 234755

Summary: error handling in copy-paste code
Product: [Fedora] Fedora Reporter: Matthias Clasen <mclasen>
Component: xdg-user-dirsAssignee: Alexander Larsson <alexl>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-11 14:29:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthias Clasen 2007-04-01 13:30:04 UTC
I used the lookup function to make gnome-screensavers slide show screensaver
use PICTURES. It turns out people don't like the fact that it falls back to
HOME if user-dirs are not set up. 

To fix this I had to use 
 strcmp (result, "/tmp") == 0 || strcmp (result, g_get_home_dir()) == 0)
which is a bit ugly. It would be nicer if I could either get some kind of
error reported, or pass in a replacement object a la

default = g_build_filename (g_get_home_dir (), "Pictures", NULL);
path = xdg_user_dirs_lookup_or_else ("PICTURES", default);

Comment 1 Alexander Larsson 2007-04-11 14:29:16 UTC
Fixed in xdg-user-dirs-0.6-1.fc7