diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd16f04..c47a3d6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@
PROJECT(seafile-client)
SET(SEAFILE_CLIENT_VERSION_MAJOR 8)
SET(SEAFILE_CLIENT_VERSION_MINOR 0)
-SET(SEAFILE_CLIENT_VERSION_PATCH 6)
+SET(SEAFILE_CLIENT_VERSION_PATCH 7)
SET(PROJECT_VERSION "${SEAFILE_CLIENT_VERSION_MAJOR}.${SEAFILE_CLIENT_VERSION_MINOR}.${SEAFILE_CLIENT_VERSION_PATCH}")
ADD_DEFINITIONS(-DSEAFILE_CLIENT_VERSION=${PROJECT_VERSION})
ADD_DEFINITIONS(-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26)
diff --git a/Info.plist b/Info.plist
index 0c75bf3..a2154b1 100644
--- a/Info.plist
+++ b/Info.plist
@@ -15,9 +15,9 @@
CFBundleName
Seafile
CFBundleShortVersionString
- 8.0.6
+ 8.0.7
CFBundleVersion
- 8.0.6
+ 8.0.7
CFBundleSignature
????
NSRequiresAquaSystemAppearance
diff --git a/seafile-client.rc b/seafile-client.rc
index bc474b0..519c293 100644
--- a/seafile-client.rc
+++ b/seafile-client.rc
@@ -71,8 +71,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 8,0,6,0
- PRODUCTVERSION 8,0,6,0
+ FILEVERSION 8,0,7,0
+ PRODUCTVERSION 8,0,7,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -89,12 +89,12 @@
BEGIN
VALUE "CompanyName", "HaiWenHuZhi ltd."
VALUE "FileDescription", "Seafile Client"
- VALUE "FileVersion", "8.0.6.0"
+ VALUE "FileVersion", "8.0.7.0"
VALUE "InternalName", "seafile-applet.exe"
VALUE "LegalCopyright", "Copyright (C) 2021"
VALUE "OriginalFilename", "seafile-applet.exe"
VALUE "ProductName", "Seafile Client"
- VALUE "ProductVersion", "8.0.6.0"
+ VALUE "ProductVersion", "8.0.7.0"
END
END
BLOCK "VarFileInfo"
diff --git a/seafile-client.vcxproj b/seafile-client.vcxproj
index 0e4bac0..42bc043 100644
--- a/seafile-client.vcxproj
+++ b/seafile-client.vcxproj
@@ -395,7 +395,7 @@
- SEAFILE_CLIENT_VERSION=8.0.6;HAVE_SHIBBOLETH_SUPPORT;HAVE_SPARKLE_SUPPORT;SEAFILE_CLIENT_HAS_CRASH_REPORTER;WIN32_LEAN_AND_MEAN;QUAZIP_BUILD;%(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)
$(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)
stdcpp14
diff --git a/src/filebrowser/data-mgr.cpp b/src/filebrowser/data-mgr.cpp
index 5207b06..df6332b 100644
--- a/src/filebrowser/data-mgr.cpp
+++ b/src/filebrowser/data-mgr.cpp
@@ -230,12 +230,10 @@
connect(req, SIGNAL(success(const QString&)),
SLOT(onCopyDirentsSuccess(const QString&)));
-
connect(req, SIGNAL(failed(const ApiError&)),
- SIGNAL(copyDirentsFailed(const ApiError&)));
+ SLOT(onCopyDirentsFailed(const ApiError&)));
reqs_.push_back(req);
req->send();
-
} else {
// First to invoke ssync api v2.1 if async api return 404 ,then invoke v2.0 async api
AsyncCopyMultipleItemsRequest *req =
@@ -389,9 +387,8 @@
connect(req, SIGNAL(success(const QString&)),
SLOT(onMoveDirentsSuccess(const QString&)));
-
connect(req, SIGNAL(failed(const ApiError&)),
- SIGNAL(moveDirentsFailed(const ApiError&)));
+ SLOT(onMoveDirentsFailed(const ApiError&)));
reqs_.push_back(req);
req->send();
} else {
@@ -579,6 +576,13 @@
void DataManager::onCopyDirentsSuccess(const QString& dst_repo_id)
{
emit copyDirentsSuccess(dst_repo_id);
+ copy_move_in_progress_ = false;
+}
+
+void DataManager::onCopyDirentsFailed(const ApiError& error)
+{
+ emit copyDirentsFailed(error);
+ copy_move_in_progress_ = false;
}
void DataManager::onMoveDirentsSuccess(const QString& dst_repo_id)
@@ -587,6 +591,13 @@
dirents_cache_->expireCachedDirents(req->srcRepoId(), req->srcPath());
emit moveDirentsSuccess(dst_repo_id);
+ copy_move_in_progress_ = false;
+}
+
+void DataManager::onMoveDirentsFailed(const ApiError& error)
+{
+ emit moveDirentsFailed(error);
+ copy_move_in_progress_ = false;
}
void DataManager::removeDirentsCache(const QString& repo_id,
diff --git a/src/filebrowser/data-mgr.h b/src/filebrowser/data-mgr.h
index f757f34..15a4033 100644
--- a/src/filebrowser/data-mgr.h
+++ b/src/filebrowser/data-mgr.h
@@ -170,7 +170,9 @@
void onRemoveDirentSuccess(const QString& repo_id);
void onRemoveDirentsSuccess(const QString& repo_id);
void onCopyDirentsSuccess(const QString& dst_repo_id);
+ void onCopyDirentsFailed(const ApiError& error);
void onMoveDirentsSuccess(const QString& dst_repo_id);
+ void onMoveDirentsFailed(const ApiError& error);
void onCreateSubrepoSuccess(const QString& new_repoid);
void onCreateSubrepoRefreshSuccess(const ServerRepo& new_repo);
diff --git a/src/rpc/rpc-client.cpp b/src/rpc/rpc-client.cpp
index 2c8b7fd..e60741b 100644
--- a/src/rpc/rpc-client.cpp
+++ b/src/rpc/rpc-client.cpp
@@ -1,5 +1,3 @@
-extern "C" {
-
#include
#include
@@ -11,8 +9,6 @@
#include
#include
#endif
-
-}
#include
#include
diff --git a/src/rpc/rpc-server.cpp b/src/rpc/rpc-server.cpp
index a17b50e..90bc512 100644
--- a/src/rpc/rpc-server.cpp
+++ b/src/rpc/rpc-server.cpp
@@ -1,5 +1,3 @@
-extern "C" {
-
#include
#include
#include
@@ -7,8 +5,6 @@
#include "searpc-signature.h"
#include "searpc-marshal.h"
-
-}
#include
diff --git a/src/rpc/searpc-marshal.h b/src/rpc/searpc-marshal.h
index 81bc69a..5ce55c3 100644
--- a/src/rpc/searpc-marshal.h
+++ b/src/rpc/searpc-marshal.h
@@ -1,3 +1,4 @@
+#include
static char *
marshal_int__void (void *func, json_t *param_array, gsize *ret_len)
diff --git a/src/rpc/searpc-signature.h b/src/rpc/searpc-signature.h
index 7df7cc1..46627d1 100644
--- a/src/rpc/searpc-signature.h
+++ b/src/rpc/searpc-signature.h
@@ -1,3 +1,4 @@
+#include
inline static gchar *
searpc_signature_int__void()
diff --git a/src/utils/log.c b/src/utils/log.c
index 57d8e66..3750b8e 100644
--- a/src/utils/log.c
+++ b/src/utils/log.c
@@ -71,35 +71,30 @@
const int delete_threshold = 300 * 1000 * 1000;
if (log_file_stat_buf.st_size <= delete_threshold) {
return;
- } else {
- const char* backup_file_name_postfix = "-old";
- GString *backup_file = g_string_new(file);
- g_string_insert(backup_file, backup_file->len - 4, backup_file_name_postfix);
- // 4 is length of log file postfix ".log"
- // rename log file "***.log" to "***-old.log"
- char file_name[4096] = {0};
- memcpy(file_name, backup_file->str, backup_file->len);
- if (backup_file) {
+ }
+
+ const char* backup_file_name_postfix = "-old";
+ GString *backup_file = g_string_new(file);
+ g_string_insert(backup_file, backup_file->len - 4, backup_file_name_postfix);
+ // 4 is length of log file postfix ".log"
+ // rename log file "***.log" to "***-old.log"
+
+ if (g_file_test(backup_file->str, G_FILE_TEST_EXISTS)) {
+ if (g_remove(backup_file->str) != 0) {
+ g_warning ("Delete old log file %s failed errno=%d.", backup_file->str, errno);
g_string_free(backup_file, TRUE);
- }
-
- if (g_file_test(file_name, G_FILE_TEST_EXISTS)) {
- if (g_remove(file_name) != 0) {
- g_warning ("Delete old log file %s failed errno=%d.", file_name, errno);
- return;
- } else {
- g_warning ("Deleted old log file %s.", file_name);
- }
- }
-
- if (g_rename(file, file_name) == 0) {
- g_warning ("Renamed %s to backup file %s.", file, file_name);
return;
} else {
- g_warning ("Rename %s to backup file failed errno=%d.", file, errno);
- return;
+ g_warning ("Deleted old log file %s.", backup_file->str);
}
}
+
+ if (g_rename(file, backup_file->str) == 0) {
+ g_warning ("Renamed %s to backup file %s.", file, backup_file->str);
+ } else {
+ g_warning ("Rename %s to backup file failed errno=%d.", file, errno);
+ }
+ g_string_free(backup_file, TRUE);
}
int
diff --git a/src/utils/uninstall-helpers.cpp b/src/utils/uninstall-helpers.cpp
index 8507a7a..1b2463a 100644
--- a/src/utils/uninstall-helpers.cpp
+++ b/src/utils/uninstall-helpers.cpp
@@ -1,4 +1,3 @@
-extern "C" {
#include
#include
@@ -9,8 +8,6 @@
#include
#include
#endif
-
-}
#include