After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676658 - Small improvements for Util::get_* functions
Small improvements for Util::get_* functions
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-05-23 16:38 UTC by Christophe Fergeau
Modified: 2016-03-31 13:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use consistent naming for Util::get_*_pkg*_dir (6.31 KB, patch)
2012-05-23 16:38 UTC, Christophe Fergeau
committed Details | Review
Remove useless ensure_directory() call (954 bytes, patch)
2012-05-23 16:38 UTC, Christophe Fergeau
committed Details | Review
Remove _dir part from Util::get*unattended_dir (5.34 KB, patch)
2012-05-23 16:38 UTC, Christophe Fergeau
committed Details | Review

Description Christophe Fergeau 2012-05-23 16:38:17 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
Comment 1 Christophe Fergeau 2012-05-23 16:38:19 UTC
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.
Comment 2 Christophe Fergeau 2012-05-23 16:38:27 UTC
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.
Comment 3 Christophe Fergeau 2012-05-23 16:38:29 UTC
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.
Comment 4 Marc-Andre Lureau 2012-05-23 17:15:43 UTC
Review of attachment 214787 [details] [review]:

ack
Comment 5 Marc-Andre Lureau 2012-05-23 17:16:41 UTC
Review of attachment 214788 [details] [review]:

I guess it's supposed to be a user directory then?
Comment 6 Marc-Andre Lureau 2012-05-23 17:18:05 UTC
Review of attachment 214789 [details] [review]:

ack
Comment 7 Christophe Fergeau 2012-05-23 19:35:18 UTC
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_
Comment 8 Marc-Andre Lureau 2012-05-23 19:43:42 UTC
Review of attachment 214788 [details] [review]:

ack
Comment 9 Christophe Fergeau 2012-05-24 11:31:22 UTC
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