|
Lines 88-94
Link Here
|
| 88 |
_tsearchenv_s("PK2DeviceFile.dat", "PATH", tempString); |
88 |
_tsearchenv_s("PK2DeviceFile.dat", "PATH", tempString); |
| 89 |
if (_tcslen(tempString) < 17) |
89 |
if (_tcslen(tempString) < 17) |
| 90 |
{ |
90 |
{ |
| 91 |
_tcsncpy_s(tempString, "PK2DeviceFile.dat", 17); |
91 |
// Try /usr/share/pk2 first |
|
|
92 |
_tcsncpy_s(tempString, "/usr/share/pk2/PK2DeviceFile.dat", 32); |
| 93 |
|
| 94 |
if(access(tempString, 0)) |
| 95 |
// Well, that didn't work, default to the current directory |
| 96 |
_tcsncpy_s(tempString, "PK2DeviceFile.dat", 17); |
| 92 |
} |
97 |
} |
| 93 |
} |
98 |
} |
| 94 |
if (!PicFuncs.ReadDeviceFile(tempString)) |
99 |
if (!PicFuncs.ReadDeviceFile(tempString)) |