1 |
sbriesen 10/08/01 00:45:49 |
2 |
|
3 |
Added: bdsup2sub-4.0.0-xdg.patch |
4 |
Log: |
5 |
made a better XDG patch |
6 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: bdsup2sub-4.0.0-xdg.patch |
15 |
=================================================================== |
16 |
--- src/deadbeef/SupTools/Core.java 2010-07-29 13:01:48.000000000 +0200 |
17 |
+++ src/deadbeef/SupTools/Core.java 2010-08-01 02:19:25.215473885 +0200 |
18 |
@@ -22,6 +22,8 @@ |
19 |
import deadbeef.Tools.Props; |
20 |
import deadbeef.Tools.ToolBox; |
21 |
|
22 |
+import xdg.*; |
23 |
+ |
24 |
/* |
25 |
* Copyright 2009 Volker Oth (0xdeadbeef) |
26 |
* |
27 |
@@ -750,6 +752,7 @@ |
28 |
cliMode = false; |
29 |
String s = c.getClass().getName().replace('.','/') + ".class"; |
30 |
URL url = c.getClass().getClassLoader().getResource(s); |
31 |
+ /* |
32 |
int pos; |
33 |
try { |
34 |
fnameProps = URLDecoder.decode(url.getPath(),"UTF-8"); |
35 |
@@ -767,6 +770,8 @@ |
36 |
fnameProps = fnameProps.substring(0,pos+1); |
37 |
} |
38 |
fnameProps += Core.iniName; |
39 |
+ */ |
40 |
+ fnameProps = xdg.config_home() + "/" + Core.iniName; |
41 |
|
42 |
// read properties from ini file |
43 |
props = new Props(); |
44 |
@@ -905,8 +910,10 @@ |
45 |
* Write properties |
46 |
*/ |
47 |
public static void storeProps() { |
48 |
- if (props != null) |
49 |
+ if (props != null) { |
50 |
+ xdg.mkdirs_file(fnameProps); |
51 |
props.save(fnameProps); |
52 |
+ } |
53 |
} |
54 |
|
55 |
/** |