transfer auto for new tox file kinds
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / linux-debian12 (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, ) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, asan) (push) Has been cancelled
ContinuousIntegration / linux-ubuntu-latest (push) Has been cancelled
ContinuousIntegration / linux-debian12 (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / macos-latest (push) Has been cancelled
ContinuousIntegration / windows-latest (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / linux-debian12 (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, ) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, asan) (push) Has been cancelled
ContinuousIntegration / linux-ubuntu-latest (push) Has been cancelled
ContinuousIntegration / linux-debian12 (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / macos-latest (push) Has been cancelled
ContinuousIntegration / windows-latest (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
This commit is contained in:
@@ -74,7 +74,7 @@ void TransferAutoAccept::checkObj(ObjectHandle o) {
|
|||||||
|
|
||||||
// dont touch avatars for now
|
// dont touch avatars for now
|
||||||
// TODO: more generic file types??
|
// TODO: more generic file types??
|
||||||
if (const auto* fk = o.try_get<ObjComp::Tox::FileKind>(); fk != nullptr && fk->kind != 0) {
|
if (const auto* fk = o.try_get<ObjComp::Tox::FileKind>(); fk != nullptr && (fk->kind != 0 && fk->kind != 2 && fk->kind != 3 && fk->kind != 4)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ void TransferAutoAccept::checkObj(ObjectHandle o) {
|
|||||||
uint64_t total_size {0u};
|
uint64_t total_size {0u};
|
||||||
if (const auto* si = o.try_get<ObjComp::F::SingleInfo>(); si != nullptr) {
|
if (const auto* si = o.try_get<ObjComp::F::SingleInfo>(); si != nullptr) {
|
||||||
if (si->file_name.empty()) {
|
if (si->file_name.empty()) {
|
||||||
return; // bad file
|
return; // bad or non- file
|
||||||
}
|
}
|
||||||
total_size = si->file_size;
|
total_size = si->file_size;
|
||||||
if (std::filesystem::exists(std::filesystem::path(save_dir_path) / si->file_name)) {
|
if (std::filesystem::exists(std::filesystem::path(save_dir_path) / si->file_name)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user