New upstream version 8.0.7
Moritz Schlarb
2 years ago
2 | 2 | PROJECT(seafile-client) |
3 | 3 | SET(SEAFILE_CLIENT_VERSION_MAJOR 8) |
4 | 4 | SET(SEAFILE_CLIENT_VERSION_MINOR 0) |
5 | SET(SEAFILE_CLIENT_VERSION_PATCH 6) | |
5 | SET(SEAFILE_CLIENT_VERSION_PATCH 7) | |
6 | 6 | SET(PROJECT_VERSION "${SEAFILE_CLIENT_VERSION_MAJOR}.${SEAFILE_CLIENT_VERSION_MINOR}.${SEAFILE_CLIENT_VERSION_PATCH}") |
7 | 7 | ADD_DEFINITIONS(-DSEAFILE_CLIENT_VERSION=${PROJECT_VERSION}) |
8 | 8 | ADD_DEFINITIONS(-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26) |
14 | 14 | <key>CFBundleName</key> |
15 | 15 | <string>Seafile</string> |
16 | 16 | <key>CFBundleShortVersionString</key> |
17 | <string>8.0.6</string> | |
17 | <string>8.0.7</string> | |
18 | 18 | <key>CFBundleVersion</key> |
19 | <string>8.0.6</string> | |
19 | <string>8.0.7</string> | |
20 | 20 | <key>CFBundleSignature</key> |
21 | 21 | <string>????</string> |
22 | 22 | <key>NSRequiresAquaSystemAppearance</key> |
70 | 70 | // |
71 | 71 | |
72 | 72 | VS_VERSION_INFO VERSIONINFO |
73 | FILEVERSION 8,0,6,0 | |
74 | PRODUCTVERSION 8,0,6,0 | |
73 | FILEVERSION 8,0,7,0 | |
74 | PRODUCTVERSION 8,0,7,0 | |
75 | 75 | FILEFLAGSMASK 0x3fL |
76 | 76 | #ifdef _DEBUG |
77 | 77 | FILEFLAGS 0x1L |
88 | 88 | BEGIN |
89 | 89 | VALUE "CompanyName", "HaiWenHuZhi ltd." |
90 | 90 | VALUE "FileDescription", "Seafile Client" |
91 | VALUE "FileVersion", "8.0.6.0" | |
91 | VALUE "FileVersion", "8.0.7.0" | |
92 | 92 | VALUE "InternalName", "seafile-applet.exe" |
93 | 93 | VALUE "LegalCopyright", "Copyright (C) 2021" |
94 | 94 | VALUE "OriginalFilename", "seafile-applet.exe" |
95 | 95 | VALUE "ProductName", "Seafile Client" |
96 | VALUE "ProductVersion", "8.0.6.0" | |
96 | VALUE "ProductVersion", "8.0.7.0" | |
97 | 97 | END |
98 | 98 | END |
99 | 99 | BLOCK "VarFileInfo" |
394 | 394 | </PropertyGroup> |
395 | 395 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
396 | 396 | <ClCompile> |
397 | <PreprocessorDefinitions>SEAFILE_CLIENT_VERSION=8.0.6;HAVE_SHIBBOLETH_SUPPORT;HAVE_SPARKLE_SUPPORT;SEAFILE_CLIENT_HAS_CRASH_REPORTER;WIN32_LEAN_AND_MEAN;QUAZIP_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
397 | <PreprocessorDefinitions>SEAFILE_CLIENT_VERSION=8.0.7;HAVE_SHIBBOLETH_SUPPORT;HAVE_SPARKLE_SUPPORT;SEAFILE_CLIENT_HAS_CRASH_REPORTER;WIN32_LEAN_AND_MEAN;QUAZIP_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
398 | 398 | <AdditionalIncludeDirectories>$(ProjectDir)..\libsearpc\lib;$(ProjectDir)..\seafile;$(ProjectDir)..\breakpad\src;$(ProjectDir)third_party\quazip;$(ProjectDir)third_party\QtAwesome;$(ProjectDir)third_party\WinSparkle-0.5.3\include;$(ProjectDir)src;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
399 | 399 | <LanguageStandard>stdcpp14</LanguageStandard> |
400 | 400 | </ClCompile> |
229 | 229 | |
230 | 230 | connect(req, SIGNAL(success(const QString&)), |
231 | 231 | SLOT(onCopyDirentsSuccess(const QString&))); |
232 | ||
233 | 232 | connect(req, SIGNAL(failed(const ApiError&)), |
234 | SIGNAL(copyDirentsFailed(const ApiError&))); | |
233 | SLOT(onCopyDirentsFailed(const ApiError&))); | |
235 | 234 | reqs_.push_back(req); |
236 | 235 | req->send(); |
237 | ||
238 | 236 | } else { |
239 | 237 | // First to invoke ssync api v2.1 if async api return 404 ,then invoke v2.0 async api |
240 | 238 | AsyncCopyMultipleItemsRequest *req = |
388 | 386 | |
389 | 387 | connect(req, SIGNAL(success(const QString&)), |
390 | 388 | SLOT(onMoveDirentsSuccess(const QString&))); |
391 | ||
392 | 389 | connect(req, SIGNAL(failed(const ApiError&)), |
393 | SIGNAL(moveDirentsFailed(const ApiError&))); | |
390 | SLOT(onMoveDirentsFailed(const ApiError&))); | |
394 | 391 | reqs_.push_back(req); |
395 | 392 | req->send(); |
396 | 393 | } else { |
578 | 575 | void DataManager::onCopyDirentsSuccess(const QString& dst_repo_id) |
579 | 576 | { |
580 | 577 | emit copyDirentsSuccess(dst_repo_id); |
578 | copy_move_in_progress_ = false; | |
579 | } | |
580 | ||
581 | void DataManager::onCopyDirentsFailed(const ApiError& error) | |
582 | { | |
583 | emit copyDirentsFailed(error); | |
584 | copy_move_in_progress_ = false; | |
581 | 585 | } |
582 | 586 | |
583 | 587 | void DataManager::onMoveDirentsSuccess(const QString& dst_repo_id) |
586 | 590 | dirents_cache_->expireCachedDirents(req->srcRepoId(), req->srcPath()); |
587 | 591 | |
588 | 592 | emit moveDirentsSuccess(dst_repo_id); |
593 | copy_move_in_progress_ = false; | |
594 | } | |
595 | ||
596 | void DataManager::onMoveDirentsFailed(const ApiError& error) | |
597 | { | |
598 | emit moveDirentsFailed(error); | |
599 | copy_move_in_progress_ = false; | |
589 | 600 | } |
590 | 601 | |
591 | 602 | void DataManager::removeDirentsCache(const QString& repo_id, |
169 | 169 | void onRemoveDirentSuccess(const QString& repo_id); |
170 | 170 | void onRemoveDirentsSuccess(const QString& repo_id); |
171 | 171 | void onCopyDirentsSuccess(const QString& dst_repo_id); |
172 | void onCopyDirentsFailed(const ApiError& error); | |
172 | 173 | void onMoveDirentsSuccess(const QString& dst_repo_id); |
174 | void onMoveDirentsFailed(const ApiError& error); | |
173 | 175 | |
174 | 176 | void onCreateSubrepoSuccess(const QString& new_repoid); |
175 | 177 | void onCreateSubrepoRefreshSuccess(const ServerRepo& new_repo); |
0 | extern "C" { | |
1 | ||
2 | 0 | #include <searpc-client.h> |
3 | 1 | #include <searpc-named-pipe-transport.h> |
4 | 2 | |
10 | 8 | #include <seafile/seafile.h> |
11 | 9 | #include <seafile/seafile-object.h> |
12 | 10 | #endif |
13 | ||
14 | } | |
15 | 11 | |
16 | 12 | #include <QtDebug> |
17 | 13 | #include <QMutexLocker> |
0 | extern "C" { | |
1 | ||
2 | 0 | #include <searpc.h> |
3 | 1 | #include <searpc-client.h> |
4 | 2 | #include <searpc-server.h> |
6 | 4 | |
7 | 5 | #include "searpc-signature.h" |
8 | 6 | #include "searpc-marshal.h" |
9 | ||
10 | } | |
11 | 7 | |
12 | 8 | #include <QCoreApplication> |
13 | 9 |
0 | #include <searpc-server.h> | |
0 | 1 | |
1 | 2 | static char * |
2 | 3 | marshal_int__void (void *func, json_t *param_array, gsize *ret_len) |
70 | 70 | const int delete_threshold = 300 * 1000 * 1000; |
71 | 71 | if (log_file_stat_buf.st_size <= delete_threshold) { |
72 | 72 | return; |
73 | } else { | |
74 | const char* backup_file_name_postfix = "-old"; | |
75 | GString *backup_file = g_string_new(file); | |
76 | g_string_insert(backup_file, backup_file->len - 4, backup_file_name_postfix); | |
77 | // 4 is length of log file postfix ".log" | |
78 | // rename log file "***.log" to "***-old.log" | |
79 | char file_name[4096] = {0}; | |
80 | memcpy(file_name, backup_file->str, backup_file->len); | |
81 | if (backup_file) { | |
73 | } | |
74 | ||
75 | const char* backup_file_name_postfix = "-old"; | |
76 | GString *backup_file = g_string_new(file); | |
77 | g_string_insert(backup_file, backup_file->len - 4, backup_file_name_postfix); | |
78 | // 4 is length of log file postfix ".log" | |
79 | // rename log file "***.log" to "***-old.log" | |
80 | ||
81 | if (g_file_test(backup_file->str, G_FILE_TEST_EXISTS)) { | |
82 | if (g_remove(backup_file->str) != 0) { | |
83 | g_warning ("Delete old log file %s failed errno=%d.", backup_file->str, errno); | |
82 | 84 | g_string_free(backup_file, TRUE); |
83 | } | |
84 | ||
85 | if (g_file_test(file_name, G_FILE_TEST_EXISTS)) { | |
86 | if (g_remove(file_name) != 0) { | |
87 | g_warning ("Delete old log file %s failed errno=%d.", file_name, errno); | |
88 | return; | |
89 | } else { | |
90 | g_warning ("Deleted old log file %s.", file_name); | |
91 | } | |
92 | } | |
93 | ||
94 | if (g_rename(file, file_name) == 0) { | |
95 | g_warning ("Renamed %s to backup file %s.", file, file_name); | |
96 | 85 | return; |
97 | 86 | } else { |
98 | g_warning ("Rename %s to backup file failed errno=%d.", file, errno); | |
99 | return; | |
87 | g_warning ("Deleted old log file %s.", backup_file->str); | |
100 | 88 | } |
101 | 89 | } |
90 | ||
91 | if (g_rename(file, backup_file->str) == 0) { | |
92 | g_warning ("Renamed %s to backup file %s.", file, backup_file->str); | |
93 | } else { | |
94 | g_warning ("Rename %s to backup file failed errno=%d.", file, errno); | |
95 | } | |
96 | g_string_free(backup_file, TRUE); | |
102 | 97 | } |
103 | 98 | |
104 | 99 | int |