| 49 | // allowed to reach those files even though that directory is otherwise an allowed root. |
| 50 | const isReservedDatabaseFile = (filePath: string) => /^insomnia\..+\.db.*$/i.test(path.basename(filePath)); |
| 51 | const cannotAccessFileError = (securedPath: string) => |
| 52 | `Insomnia cannot access the file "${securedPath}". You must specify which directories Insomnia can access in ${SECURITY_SETTINGS_PATH_LABEL}`; |
| 53 | const resolveRealPath = async (filePath: string) => fs.promises.realpath(filePath).catch(() => filePath); |
| 54 | const statOrNull = async (filePath: string) => fs.promises.stat(filePath).catch(() => null); |
| 55 | const getUserdataDirectory = () => process.env.INSOMNIA_DATA_PATH || electron.app.getPath('userData'); |