fix(RemoteAuth): pass session name to store.save instead of full path (#201660)
store.save() was receiving path.join(this.dataPath, this.sessionName)
instead of just this.sessionName. This caused remote stores (e.g. S3)
to use the full local filesystem path as the storage key, resulting in
zip files being saved under paths like:
sessions/Users/user/project/.wwebjs_session/default/RemoteAuth-default.zip
instead of:
sessions/RemoteAuth-default.zip
all other store calls (sessionExists, extract, delete) already pass
this.sessionName correctly. This brings store.save in line with them.
the local filesystem operations (creating and cleaning up the zip file)
continue to use path.join(this.dataPath, ...) which is correct.
regression introduced in e6fd112.
Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
This commit is contained in:
parent
3e810b6913
commit
51f5920153
1 changed files with 1 additions and 1 deletions
|
|
@ -139,7 +139,7 @@ class RemoteAuth extends BaseAuthStrategy {
|
|||
try {
|
||||
compressedSessionPath = await this.compressSession();
|
||||
await this.store.save({
|
||||
session: path.join(this.dataPath, this.sessionName),
|
||||
session: this.sessionName,
|
||||
});
|
||||
if (options && options.emit)
|
||||
this.client.emit(Events.REMOTE_SESSION_SAVED);
|
||||
|
|
|
|||
Loading…
Reference in a new issue