[Libreoffice-commits] core.git: Branch 'feature/mar-updater' - 2 commits - onlineupdate/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Wed May 3 20:52:50 UTC 2017
onlineupdate/source/service/serviceinstall.cxx | 1
onlineupdate/source/update/updater/updater.cxx | 34 -------------------------
2 files changed, 1 insertion(+), 34 deletions(-)
New commits:
commit e5e907e0492dfdc19b92fd8c3d8106824ab0c252
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed May 3 22:51:57 2017 +0200
add TODO
Change-Id: I2d913a878aba91fea41a010237dd685845b5b648
diff --git a/onlineupdate/source/service/serviceinstall.cxx b/onlineupdate/source/service/serviceinstall.cxx
index a225e9445544..0bbc875086be 100644
--- a/onlineupdate/source/service/serviceinstall.cxx
+++ b/onlineupdate/source/service/serviceinstall.cxx
@@ -75,6 +75,7 @@ ReadMaintenanceServiceStrings(LPCWSTR path,
{
// Read in the maintenance service description string if specified.
const unsigned int kNumStrings = 1;
+ // TODO: moggi: needs adaption for LibreOffice
const char *kServiceKeys = "MozillaMaintenanceDescription\0";
char serviceStrings[kNumStrings][MAX_TEXT_LEN];
int result = ReadStrings(path, kServiceKeys,
commit 02c36ab9c67ce571ad06263f1bd021e89a76b1aa
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed May 3 22:50:54 2017 +0200
remove unused hard link support
Change-Id: I7f40598df74c8731b13c37b8adaa636086d204b4
diff --git a/onlineupdate/source/update/updater/updater.cxx b/onlineupdate/source/update/updater/updater.cxx
index 3c5baca1e3ac..1e36b4d300f8 100644
--- a/onlineupdate/source/update/updater/updater.cxx
+++ b/onlineupdate/source/update/updater/updater.cxx
@@ -112,8 +112,6 @@ struct UpdateServerThreadArgs
#define USE_EXECV
#endif
-# define MAYBE_USE_HARD_LINKS 0
-
#if defined(VERIFY_MAR_SIGNATURE) && !defined(_WIN32) && !defined(MACOSX)
#include <nss.h>
#include <nspr.h>
@@ -639,26 +637,6 @@ static int ensure_copy_symlink(const NS_tchar *path, const NS_tchar *dest)
}
#endif
-#if MAYBE_USE_HARD_LINKS
-/*
- * Creates a hardlink (destFilename) which points to the existing file
- * (srcFilename).
- *
- * @return 0 if successful, an error otherwise
- */
-
-static int
-create_hard_link(const NS_tchar *srcFilename, const NS_tchar *destFilename)
-{
- if (link(srcFilename, destFilename) < 0)
- {
- LOG(("link(%s, %s) failed errno = %d", srcFilename, destFilename, errno));
- return WRITE_ERROR;
- }
- return OK;
-}
-#endif
-
// Copy the file named path onto a new file named dest.
static int ensure_copy(const NS_tchar *path, const NS_tchar *dest)
{
@@ -689,18 +667,6 @@ static int ensure_copy(const NS_tchar *path, const NS_tchar *dest)
}
#endif
-#if MAYBE_USE_HARD_LINKS
- if (sUseHardLinks)
- {
- if (!create_hard_link(path, dest))
- {
- return OK;
- }
- // Since we failed to create the hard link, fall through and copy the file.
- sUseHardLinks = false;
- }
-#endif
-
AutoFile infile(ensure_open(path, NS_T("rb"), ss.st_mode));
if (!infile)
{
More information about the Libreoffice-commits
mailing list