Codebase list seafile-client / 3b1ceda
New upstream version 8.0.7 Moritz Schlarb 2 years ago
12 changed file(s) with 47 addition(s) and 48 deletion(s). Raw diff Collapse all Expand all
22 PROJECT(seafile-client)
33 SET(SEAFILE_CLIENT_VERSION_MAJOR 8)
44 SET(SEAFILE_CLIENT_VERSION_MINOR 0)
5 SET(SEAFILE_CLIENT_VERSION_PATCH 6)
5 SET(SEAFILE_CLIENT_VERSION_PATCH 7)
66 SET(PROJECT_VERSION "${SEAFILE_CLIENT_VERSION_MAJOR}.${SEAFILE_CLIENT_VERSION_MINOR}.${SEAFILE_CLIENT_VERSION_PATCH}")
77 ADD_DEFINITIONS(-DSEAFILE_CLIENT_VERSION=${PROJECT_VERSION})
88 ADD_DEFINITIONS(-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26)
1414 <key>CFBundleName</key>
1515 <string>Seafile</string>
1616 <key>CFBundleShortVersionString</key>
17 <string>8.0.6</string>
17 <string>8.0.7</string>
1818 <key>CFBundleVersion</key>
19 <string>8.0.6</string>
19 <string>8.0.7</string>
2020 <key>CFBundleSignature</key>
2121 <string>????</string>
2222 <key>NSRequiresAquaSystemAppearance</key>
7070 //
7171
7272 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
7575 FILEFLAGSMASK 0x3fL
7676 #ifdef _DEBUG
7777 FILEFLAGS 0x1L
8888 BEGIN
8989 VALUE "CompanyName", "HaiWenHuZhi ltd."
9090 VALUE "FileDescription", "Seafile Client"
91 VALUE "FileVersion", "8.0.6.0"
91 VALUE "FileVersion", "8.0.7.0"
9292 VALUE "InternalName", "seafile-applet.exe"
9393 VALUE "LegalCopyright", "Copyright (C) 2021"
9494 VALUE "OriginalFilename", "seafile-applet.exe"
9595 VALUE "ProductName", "Seafile Client"
96 VALUE "ProductVersion", "8.0.6.0"
96 VALUE "ProductVersion", "8.0.7.0"
9797 END
9898 END
9999 BLOCK "VarFileInfo"
394394 </PropertyGroup>
395395 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
396396 <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>
398398 <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>
399399 <LanguageStandard>stdcpp14</LanguageStandard>
400400 </ClCompile>
229229
230230 connect(req, SIGNAL(success(const QString&)),
231231 SLOT(onCopyDirentsSuccess(const QString&)));
232
233232 connect(req, SIGNAL(failed(const ApiError&)),
234 SIGNAL(copyDirentsFailed(const ApiError&)));
233 SLOT(onCopyDirentsFailed(const ApiError&)));
235234 reqs_.push_back(req);
236235 req->send();
237
238236 } else {
239237 // First to invoke ssync api v2.1 if async api return 404 ,then invoke v2.0 async api
240238 AsyncCopyMultipleItemsRequest *req =
388386
389387 connect(req, SIGNAL(success(const QString&)),
390388 SLOT(onMoveDirentsSuccess(const QString&)));
391
392389 connect(req, SIGNAL(failed(const ApiError&)),
393 SIGNAL(moveDirentsFailed(const ApiError&)));
390 SLOT(onMoveDirentsFailed(const ApiError&)));
394391 reqs_.push_back(req);
395392 req->send();
396393 } else {
578575 void DataManager::onCopyDirentsSuccess(const QString& dst_repo_id)
579576 {
580577 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;
581585 }
582586
583587 void DataManager::onMoveDirentsSuccess(const QString& dst_repo_id)
586590 dirents_cache_->expireCachedDirents(req->srcRepoId(), req->srcPath());
587591
588592 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;
589600 }
590601
591602 void DataManager::removeDirentsCache(const QString& repo_id,
169169 void onRemoveDirentSuccess(const QString& repo_id);
170170 void onRemoveDirentsSuccess(const QString& repo_id);
171171 void onCopyDirentsSuccess(const QString& dst_repo_id);
172 void onCopyDirentsFailed(const ApiError& error);
172173 void onMoveDirentsSuccess(const QString& dst_repo_id);
174 void onMoveDirentsFailed(const ApiError& error);
173175
174176 void onCreateSubrepoSuccess(const QString& new_repoid);
175177 void onCreateSubrepoRefreshSuccess(const ServerRepo& new_repo);
0 extern "C" {
1
20 #include <searpc-client.h>
31 #include <searpc-named-pipe-transport.h>
42
108 #include <seafile/seafile.h>
119 #include <seafile/seafile-object.h>
1210 #endif
13
14 }
1511
1612 #include <QtDebug>
1713 #include <QMutexLocker>
0 extern "C" {
1
20 #include <searpc.h>
31 #include <searpc-client.h>
42 #include <searpc-server.h>
64
75 #include "searpc-signature.h"
86 #include "searpc-marshal.h"
9
10 }
117
128 #include <QCoreApplication>
139
0 #include <searpc-server.h>
01
12 static char *
23 marshal_int__void (void *func, json_t *param_array, gsize *ret_len)
0 #include <searpc-server.h>
01
12 inline static gchar *
23 searpc_signature_int__void()
7070 const int delete_threshold = 300 * 1000 * 1000;
7171 if (log_file_stat_buf.st_size <= delete_threshold) {
7272 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);
8284 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);
9685 return;
9786 } 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);
10088 }
10189 }
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);
10297 }
10398
10499 int
0 extern "C" {
10 #include <searpc-client.h>
21
32 #include <searpc.h>
87 #include <seafile/seafile.h>
98 #include <seafile/seafile-object.h>
109 #endif
11
12 }
1310
1411 #include <QtGlobal>
1512