[Pkg-owncloud-commits] [owncloud-client] 40/332: StateDB: Remove _csync_win32_hide_file and use other implementation

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:06:35 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 18359d787100501b8b2422147701519b6104efa2
Author: Markus Goetz <markus at woboq.com>
Date:   Tue Jun 3 18:19:31 2014 +0200

    StateDB: Remove _csync_win32_hide_file and use other implementation
---
 csync/src/csync_statedb.c | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/csync/src/csync_statedb.c b/csync/src/csync_statedb.c
index 78372f6..08bbf32 100644
--- a/csync/src/csync_statedb.c
+++ b/csync/src/csync_statedb.c
@@ -57,29 +57,6 @@ int csync_get_statedb_exists(CSYNC *ctx) {
   return ctx->statedb.exists;
 }
 
-/* Set the hide attribute in win32. That makes it invisible in normal explorers */
-static void _csync_win32_hide_file( const char *file ) {
-#ifdef _WIN32
-  mbchar_t *fileName;
-  DWORD dwAttrs;
-
-  if( !file ) return;
-
-  fileName = c_utf8_to_locale( file );
-  dwAttrs = GetFileAttributesW(fileName);
-
-  if (dwAttrs==INVALID_FILE_ATTRIBUTES) return;
-
-  if (!(dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
-     SetFileAttributesW(fileName, dwAttrs | FILE_ATTRIBUTE_HIDDEN );
-  }
-
-  c_free_locale_string(fileName);
-#else
-    (void) file;
-#endif
-}
-
 static int _csync_check_db_integrity(sqlite3 *db) {
     c_strlist_t *result = NULL;
     int rc = -1;
@@ -166,7 +143,7 @@ static int _csync_statedb_check(const char *statedb) {
   rc = sqlite3_open(statedb, &db);
   if (rc == SQLITE_OK) {
     sqlite3_close(db);
-    _csync_win32_hide_file(statedb);
+    csync_win32_set_file_hidden(statedb, true);
     return 1;
   }
   sqlite3_close(db);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list