mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Fix token path for root dir
This commit is contained in:
parent
72e6e7a9ec
commit
a60ad1e980
1 changed files with 16 additions and 4 deletions
|
@ -67,11 +67,23 @@ class TouchTokenManager {
|
|||
return platform.UniversalStorage().getString(name);
|
||||
}
|
||||
|
||||
String _getRemotePath(Account account, File file) =>
|
||||
"${remote_storage_util.getRemoteTouchDir(account)}/${file.strippedPath}/token.txt";
|
||||
String _getRemotePath(Account account, File file) {
|
||||
final strippedPath = file.strippedPath;
|
||||
if (strippedPath == ".") {
|
||||
return "${remote_storage_util.getRemoteTouchDir(account)}/token.txt";
|
||||
} else {
|
||||
return "${remote_storage_util.getRemoteTouchDir(account)}/${file.strippedPath}/token.txt";
|
||||
}
|
||||
}
|
||||
|
||||
String _getLocalStorageName(Account account, File file) =>
|
||||
"touch/${account.url.replaceFirst('://', '_')}/${file.strippedPath}/token";
|
||||
String _getLocalStorageName(Account account, File file) {
|
||||
final strippedPath = file.strippedPath;
|
||||
if (strippedPath == ".") {
|
||||
return "touch/${account.url.replaceFirst('://', '_')}/token";
|
||||
} else {
|
||||
return "touch/${account.url.replaceFirst('://', '_')}/${file.strippedPath}/token";
|
||||
}
|
||||
}
|
||||
|
||||
static final _log = Logger("touch_token_manager.TouchTokenManager");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue