transfer auto for new tox file kinds
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / linux-debian12 (push) Waiting to run
ContinuousDelivery / windows (windows-2022, ) (push) Waiting to run
ContinuousDelivery / windows (windows-2022, asan) (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux-ubuntu-latest (push) Waiting to run
ContinuousIntegration / linux-debian12 (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Waiting to run
ContinuousIntegration / macos-latest (push) Waiting to run
ContinuousIntegration / windows-latest (push) Waiting to run

This commit is contained in:
Green Sky
2026-02-01 22:56:32 +01:00
parent ae79fb17f3
commit 5150cce4de

View File

@@ -74,7 +74,7 @@ void TransferAutoAccept::checkObj(ObjectHandle o) {
// dont touch avatars for now
// 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;
}
@@ -82,7 +82,7 @@ void TransferAutoAccept::checkObj(ObjectHandle o) {
uint64_t total_size {0u};
if (const auto* si = o.try_get<ObjComp::F::SingleInfo>(); si != nullptr) {
if (si->file_name.empty()) {
return; // bad file
return; // bad or non- file
}
total_size = si->file_size;
if (std::filesystem::exists(std::filesystem::path(save_dir_path) / si->file_name)) {