From 02edad4c989f60e248657bb7854253f8297db583 Mon Sep 17 00:00:00 2001 From: saturneric Date: Tue, 30 Jul 2024 19:33:21 +0200 Subject: fix: use standard os detection macro --- src/core/function/ArchiveFileOperator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/function/ArchiveFileOperator.cpp') diff --git a/src/core/function/ArchiveFileOperator.cpp b/src/core/function/ArchiveFileOperator.cpp index c478ed15..2fc801ab 100644 --- a/src/core/function/ArchiveFileOperator.cpp +++ b/src/core/function/ArchiveFileOperator.cpp @@ -103,7 +103,7 @@ void ArchiveFileOperator::NewArchive2DataExchanger( auto *disk = archive_read_disk_new(); archive_read_disk_set_standard_lookup(disk); -#ifdef WINDOWS +#if defined(_WIN32) || defined(WIN32) auto target_directory_utf16_wstr = std::wstring( reinterpret_cast((target_directory).utf16())); auto r = @@ -135,7 +135,7 @@ void ArchiveFileOperator::NewArchive2DataExchanger( archive_read_disk_descend(disk); -#ifdef WINDOWS +#if defined(_WIN32) || defined(WIN32) auto source_path = QString::fromUtf16(reinterpret_cast( archive_entry_pathname_w(entry))); @@ -150,7 +150,7 @@ void ArchiveFileOperator::NewArchive2DataExchanger( auto relativ_path_name = base_path.relativeFilePath(source_path); archive_entry_set_pathname(entry, relativ_path_name.toUtf8()); -#ifdef WINDOWS +#if defined(_WIN32) || defined(WIN32) auto source_path_utf16_wstr = std::wstring( reinterpret_cast(source_path.utf16())); archive_entry_copy_sourcepath_w(entry, @@ -253,7 +253,7 @@ void ArchiveFileOperator::ExtractArchiveFromDataExchanger( auto path_name = QString::fromUtf8(archive_entry_pathname(entry)); auto target_path_name = target_path + "/" + path_name; -#ifdef WINDOWS +#if defined(_WIN32) || defined(WIN32) auto target_path_utf16_wstr = std::wstring( reinterpret_cast((target_path_name).utf16())); archive_entry_copy_pathname_w(entry, target_path_utf16_wstr.c_str()); -- cgit v1.2.3