[Pkg-owncloud-commits] [owncloud-client] 329/498: owncloudcmd: add option to not ignore hidden files.

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:03 UTC 2015


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 1aa17cdb69fb27b912f87688d42b46419e3789dd
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Wed Jul 15 11:30:50 2015 +0200

    owncloudcmd: add option to not ignore hidden files.
---
 src/cmd/cmd.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/cmd/cmd.cpp b/src/cmd/cmd.cpp
index d24418d..a75be04 100644
--- a/src/cmd/cmd.cpp
+++ b/src/cmd/cmd.cpp
@@ -55,6 +55,7 @@ struct CmdOptions {
     bool trustSSL;
     bool useNetrc;
     bool interactive;
+    bool ignoreHiddenFiles;
     QString exclude;
     QString unsyncedfolders;
 };
@@ -154,6 +155,7 @@ void help()
     std::cout << "  --password, -p [pass]  Use [pass] as password" << std::endl;
     std::cout << "  -n                     Use netrc (5) for login" << std::endl;
     std::cout << "  --non-interactive      Do not block execution with interaction" << std::endl;
+    std::cout << "  -h                     Sync hidden files,do not ignore them" << std::endl;
     std::cout << "  --version, -v          Display version and exit" << std::endl;
     std::cout << "" << std::endl;
     exit(1);
@@ -216,6 +218,8 @@ void parseOptions( const QStringList& app_args, CmdOptions *options )
             options->trustSSL = true;
         } else if( option == "-n") {
             options->useNetrc = true;
+        } else if( option == "-h") {
+            options->ignoreHiddenFiles = false;
         } else if( option == "--non-interactive") {
             options->interactive = false;
         } else if( (option == "-u" || option == "--user") && !it.peekNext().startsWith("-") ) {
@@ -269,6 +273,7 @@ int main(int argc, char **argv) {
     options.trustSSL = false;
     options.useNetrc = false;
     options.interactive = true;
+    options.ignoreHiddenFiles = true;
     ClientProxy clientProxy;
 
     parseOptions( app.arguments(), &options );
@@ -364,6 +369,9 @@ restart_sync:
         return EXIT_FAILURE;
     }
 
+    // ignore hidden files or not
+    _csync_ctx->ignore_hidden_files = options.ignoreHiddenFiles;
+
     csync_set_module_property(_csync_ctx, "csync_context", _csync_ctx);
     if( !options.proxy.isNull() ) {
         QString host;

-- 
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