1 |
josejx 09/02/02 20:45:10 |
2 |
|
3 |
Added: pk2cmd-add-share-dir-for-dev-file-1.20.patch |
4 |
Log: |
5 |
Revision bump, bug #257138. Marked 1.12.0-r1 stable on ppc/ppc64. |
6 |
(Portage version: 2.1.6.4/cvs/Linux 2.6.23 x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: pk2cmd-add-share-dir-for-dev-file-1.20.patch |
15 |
=================================================================== |
16 |
--- cmd_app.cpp.old 2009-01-31 21:23:30.000000000 +0100 |
17 |
+++ cmd_app.cpp 2009-01-31 21:25:48.000000000 +0100 |
18 |
@@ -88,7 +88,12 @@ |
19 |
_tsearchenv_s("PK2DeviceFile.dat", "PATH", tempString); |
20 |
if (_tcslen(tempString) < 17) |
21 |
{ |
22 |
- _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17); |
23 |
+ // Try /usr/share/pk2 first |
24 |
+ _tcsncpy_s(tempString, "/usr/share/pk2/PK2DeviceFile.dat", 32); |
25 |
+ |
26 |
+ if(access(tempString, 0)) |
27 |
+ // Well, that didn't work, default to the current directory |
28 |
+ _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17); |
29 |
} |
30 |
} |
31 |
if (!PicFuncs.ReadDeviceFile(tempString)) |