control: add g path_clean to remove all links from node (#475)

refactor: small cosmetic changes
This commit is contained in:
jeefo 2023-08-08 11:48:37 +03:00
commit fb301b7b19
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
23 changed files with 205 additions and 132 deletions

View file

@ -233,7 +233,7 @@ template <typename U> bool BotStorage::save (const SmallArray <U> &data, ExtenHe
SmallArray <uint8_t> compressed (rawLength + sizeof (uint8_t) * ULZ::Excess);
// try to compress
auto compressedLength = static_cast <size_t> (ulz.compress (reinterpret_cast <uint8_t *> (data.data ()), static_cast <int32_t> (rawLength), reinterpret_cast <uint8_t *> (compressed.data ())));
const auto compressedLength = static_cast <size_t> (ulz.compress (reinterpret_cast <uint8_t *> (data.data ()), static_cast <int32_t> (rawLength), reinterpret_cast <uint8_t *> (compressed.data ())));
if (compressedLength > 0) {
StorageHeader hdr {};
@ -349,7 +349,7 @@ String BotStorage::buildPath (int32_t file, bool isMemoryLoad) {
}
// finally use correct path separators for us
return String::join (path, PATH_SEP);
return String::join (path, kPathSeparator);
}
int32_t BotStorage::storageToBotFile (int32_t options) {