GNOME Bugzilla – Bug 676658
Small improvements for Util::get_* functions
Last modified: 2016-03-31 13:56:15 UTC
These commits make some small cleanups to the functions in util.vala which are used to get file paths into various boxes related directories
Created attachment 214787 [details] [review] Use consistent naming for Util::get_*_pkg*_dir The various helpers to get the paths of the various directories boxes uses were not consistently named. When referring to path in the user home directory, some had _user_ in their name, some did not. This commit makes sure all such methods have _user_ in their name.
Created attachment 214788 [details] [review] Remove useless ensure_directory() call Util::get_unattended_dir() calls ensure_directory, but this functions uses a system directory (DATADIR/PACKAGE_TARNAME/unattended) so it's unlikely that the user will have the permissions to create directories in this directory.
Created attachment 214789 [details] [review] Remove _dir part from Util::get*unattended_dir The other similar functions don't have _dir in their name, and this helper returns the path to a filename in the unattended directory, not a directory name.
Review of attachment 214787 [details] [review]: ack
Review of attachment 214788 [details] [review]: I guess it's supposed to be a user directory then?
Review of attachment 214789 [details] [review]: ack
Review of attachment 214788 [details] [review]: There's a get_user_unattended_dir method with an ensure_directory() call in it, so I don't think this one was supposed to be _user_
Review of attachment 214788 [details] [review]: ack
Attachment 214787 [details] pushed as df50500 - Use consistent naming for Util::get_*_pkg*_dir Attachment 214788 [details] pushed as 567ea80 - Remove useless ensure_directory() call Attachment 214789 [details] pushed as 3e0c3f5 - Remove _dir part from Util::get*unattended_dir