Resolve attachments folder before using it
This commit is contained in:
parent
50100906f3
commit
b7f0ec61b9
2 changed files with 36 additions and 17 deletions
|
@ -21,7 +21,13 @@ const createPathGetter =
|
|||
if (!isString(userDataPath)) {
|
||||
throw new TypeError("'userDataPath' must be a string");
|
||||
}
|
||||
return join(userDataPath, subpath);
|
||||
|
||||
const maybeSymlink = join(userDataPath, subpath);
|
||||
if (fse.pathExistsSync(maybeSymlink)) {
|
||||
return fse.realpathSync(maybeSymlink);
|
||||
}
|
||||
|
||||
return maybeSymlink;
|
||||
};
|
||||
|
||||
export const getAvatarsPath = createPathGetter(AVATAR_PATH);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue