You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
596 B
17 lines
596 B
--- a/cmd_app.cpp
|
|
+++ b/cmd_app.cpp
|
|
@@ -88,7 +88,12 @@
|
|
_tsearchenv_s("PK2DeviceFile.dat", "PATH", tempString);
|
|
if (_tcslen(tempString) < 17)
|
|
{
|
|
- _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
|
|
+ // Try /usr/share/pk2 first
|
|
+ _tcsncpy_s(tempString, "/usr/share/pk2/PK2DeviceFile.dat", 32);
|
|
+
|
|
+ if(access(tempString, 0))
|
|
+ // Well, that didn't work, default to the current directory
|
|
+ _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
|
|
}
|
|
}
|
|
if (!PicFuncs.ReadDeviceFile(tempString))
|