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
> [email protected]
> http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

-- 
glen
_______________________________________________
pld-devel-en mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en

Reply via email to