Date: Tue, 10 Aug 2004 21:35:02 -0400 (EDT) From: Christopher Nehren <apeiron@comcast.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/70284: audio/muine uses a stub method which causes a path error Message-ID: <200408110135.i7B1Z2kc020317@prophecy.dyndns.org> Resent-Message-ID: <200408110140.i7B1eQ7L004953@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 70284 >Category: ports >Synopsis: audio/muine uses a stub method which causes a path error >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Aug 11 01:40:26 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Christopher Nehren >Release: FreeBSD 5.2-CURRENT i386 >Organization: >Environment: System: FreeBSD prophecy.dyndns.org 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sun Aug 8 22:14:06 EDT 2004 root@prophecy.dyndns.org:/usr/src/sys/i386/compile/PROPHECY i386 >Description: audio/muine uses Gnome.User.DirGet() to construct paths. This method is only a stub method; as such, the paths constructed are incomplete and reference / instead of the intended directory. Since such a path construction is used to both create and reference its user-specific configuration directory, this breaks the application. >How-To-Repeat: Install muine, try to start it as a non-root user. >Fix: I presume that Gnome.User.DirGet() will return the user's home directory once implemented, so change all of the invocations of the method to get $HOME from the environment. It's probably a good idea to send this patch upstream. diff -urN orig.muine-0.6.3/src/CoverDatabase.cs new.muine-0.6.3/src/CoverDatabase.cs --- orig.muine-0.6.3/src/CoverDatabase.cs Sat Jun 5 11:48:29 2004 +++ new.muine-0.6.3/src/CoverDatabase.cs Tue Aug 10 21:25:44 2004 @@ -57,7 +57,7 @@ amazon_locale = "us"; } - DirectoryInfo dinfo = new DirectoryInfo (User.DirGet () + "/muine"); + DirectoryInfo dinfo = new DirectoryInfo (Environment.GetEnvironmentVariable("HOME") + "/.muine"); if (!dinfo.Exists) { try { dinfo.Create (); diff -urN orig.muine-0.6.3/src/PlaylistWindow.cs new.muine-0.6.3/src/PlaylistWindow.cs --- orig.muine-0.6.3/src/PlaylistWindow.cs Sun Jun 13 09:55:19 2004 +++ new.muine-0.6.3/src/PlaylistWindow.cs Tue Aug 10 21:25:44 2004 @@ -147,7 +147,7 @@ PlayerChangedSong += DashboardFrontend.PlayerChangedSong; /* set up playlist filename */ - playlist_filename = Gnome.User.DirGet () + "/muine/playlist.m3u"; + playlist_filename = Environment.GetEnvironmentVariable("HOME") + "/.muine/playlist.m3u"; /* make sure the interface is up to date */ SelectionChanged (); diff -urN orig.muine-0.6.3/src/SongDatabase.cs new.muine-0.6.3/src/SongDatabase.cs --- orig.muine-0.6.3/src/SongDatabase.cs Sun Jun 13 09:49:46 2004 +++ new.muine-0.6.3/src/SongDatabase.cs Tue Aug 10 21:25:44 2004 @@ -58,7 +58,7 @@ public SongDatabase (int version) { - DirectoryInfo dinfo = new DirectoryInfo (User.DirGet () + "/muine"); + DirectoryInfo dinfo = new DirectoryInfo (Environment.GetEnvironmentVariable("HOME") + "/.muine"); if (!dinfo.Exists) { try { dinfo.Create (); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408110135.i7B1Z2kc020317>