owncloudcmd: Always trail path with /
authorMarkus Goetz <markus@woboq.com>
Fri, 27 Mar 2015 12:15:43 +0000 (13:15 +0100)
committerMarkus Goetz <markus@woboq.com>
Fri, 27 Mar 2015 12:15:43 +0000 (13:15 +0100)
Else the csync code vs the Qt code get confused.

src/cmd/cmd.cpp

index 3e616a7258e0cccabf9e1a3a52e0c766f649facf..0b8636bea628d310cd95b993939975ce5914c177 100644 (file)
@@ -194,6 +194,9 @@ void parseOptions( const QStringList& app_args, CmdOptions *options )
     if (options->target_url.startsWith("http"))
         options->target_url.replace(0, 4, "owncloud");
     options->source_dir = args.takeLast();
+    if (!options->source_dir.endsWith('/')) {
+        options->source_dir.append('/');
+    }
     if( !QFile::exists( options->source_dir )) {
         std::cerr << "Source dir '" << qPrintable(options->source_dir) << "' does not exist." << std::endl;
         exit(1);