Fix different user shared same local touch name

This commit is contained in:
Ming Ming 2021-05-25 23:06:16 +08:00
parent 9aa770aa4f
commit 708383d291

View file

@ -79,9 +79,9 @@ class TouchTokenManager {
String _getLocalStorageName(Account account, File file) {
final strippedPath = file.strippedPath;
if (strippedPath == ".") {
return "touch/${account.url.replaceFirst('://', '_')}/token";
return "touch/${account.url.replaceFirst('://', '_')}/${account.username}/token";
} else {
return "touch/${account.url.replaceFirst('://', '_')}/${file.strippedPath}/token";
return "touch/${account.url.replaceFirst('://', '_')}/${account.username}/${file.strippedPath}/token";
}
}