Skip to content

Commit 51f5920

Browse files
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>
1 parent 3e810b6 commit 51f5920

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/authStrategies/RemoteAuth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class RemoteAuth extends BaseAuthStrategy {
139139
try {
140140
compressedSessionPath = await this.compressSession();
141141
await this.store.save({
142-
session: path.join(this.dataPath, this.sessionName),
142+
session: this.sessionName,
143143
});
144144
if (options && options.emit)
145145
this.client.emit(Events.REMOTE_SESSION_SAVED);

0 commit comments

Comments
 (0)