修复windows下文件名可能非法问题

This commit is contained in:
zhouhao 2022-06-15 10:23:58 +08:00
parent cabc095367
commit 35947b3567
1 changed files with 4 additions and 1 deletions

View File

@ -66,7 +66,10 @@ public class PersistenceDeviceSessionManager extends ClusterDeviceSessionManager
public void init() {
super.init();
if (filePath == null) {
filePath = "./data/sessions-" + Cluster.id();
filePath = "./data/sessions-" + (Cluster
.id()
.replace(":", "_")
.replace("/", ""));
}
repository = initStore(filePath);