/[gentoo-x86]/media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.diff
Gentoo

Contents of /media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.diff

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Jul 28 21:59:13 2010 UTC (3 years, 11 months ago) by sbriesen
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
initial commit.
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 diff -Naur src.orig/deadbeef/SupTools/Core.java src/deadbeef/SupTools/Core.java
2 --- src.orig/deadbeef/SupTools/Core.java 2010-07-28 22:56:08.319223422 +0200
3 +++ src/deadbeef/SupTools/Core.java 2010-07-28 22:56:08.890223411 +0200
4 @@ -22,6 +22,8 @@
5 import deadbeef.Tools.Props;
6 import deadbeef.Tools.ToolBox;
7
8 +import java.io.File;
9 +
10 /*
11 * Copyright 2009 Volker Oth (0xdeadbeef)
12 *
13 @@ -768,6 +770,11 @@
14 }
15 fnameProps += Core.iniName;
16
17 + // use XDG spec
18 + fnameProps = System.getenv("XDG_CONFIG_HOME");
19 + if (fnameProps == null) fnameProps = System.getProperty("user.home") + "/.config";
20 + fnameProps += "/" + Core.iniName;
21 +
22 // read properties from ini file
23 props = new Props();
24 props.setHeader(Core.progNameVer+" settings - don't modify manually");
25 @@ -905,8 +912,11 @@
26 * Write properties
27 */
28 public static void storeProps() {
29 - if (props != null)
30 + if (props != null) {
31 + File path = new File(ToolBox.getPathName(fnameProps));
32 + path.mkdirs();
33 props.save(fnameProps);
34 + }
35 }
36
37 /**

  ViewVC Help
Powered by ViewVC 1.1.20