SOURCES: peercast-ini-location.patch (NEW) - unix-like config file...

Elan Ruusamäe glen at delfi.ee
Wed Jun 15 21:57:24 CEST 2005


erm, this makes config path /.peercast.ini, if $HOME is unset, should be sth 
like "peercast.ini" ?

On Wednesday 15 June 2005 16:00, saq wrote:
> Author: saq                          Date: Wed Jun 15 13:00:29 2005 GMT
> Module: SOURCES                       Tag: HEAD
> ---- Log message:
> - unix-like config file placement
>
> ---- Files affected:
> SOURCES:
>    peercast-ini-location.patch (NONE -> 1.1)  (NEW)
>
> ---- Diffs:
>
> ================================================================
> Index: SOURCES/peercast-ini-location.patch
> diff -u /dev/null SOURCES/peercast-ini-location.patch:1.1
> --- /dev/null	Wed Jun 15 15:00:29 2005
> +++ SOURCES/peercast-ini-location.patch	Wed Jun 15 15:00:24 2005
> @@ -0,0 +1,15 @@
> +--- peercast-0.1212/ui/linux/main.cpp.orig	2005-06-15 13:46:02.000000000
> +0200 ++++ peercast-0.1212/ui/linux/main.cpp	2005-06-15 13:48:02.000000000
> +0200 +@@ -97,8 +97,10 @@
> + // ----------------------------------
> + int main(int argc, char* argv[])
> + {
> +-
> +-	iniFileName.set("peercast.ini");
> ++	const char *home = getenv("HOME");
> ++	if (home == NULL) home = "";
> ++	iniFileName.set(home);
> ++	iniFileName.append("/.peercast.ini");
> +
> + 	if (argc > 2)
> + 		if (strcmp(argv[1],"-inifile")==0)
> ================================================================
> _______________________________________________
> pld-cvs-commit mailing list
> pld-cvs-commit at lists.pld-linux.org
> http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

-- 
glen



More information about the pld-devel-en mailing list