owncloudcmd: Fix some slash screwup, to make the split succeed bug #2211

This commit is contained in:
Klaas Freitag 2014-10-11 15:14:07 +02:00
parent 8eaeba6486
commit d491663143

View file

@ -167,11 +167,11 @@ void parseOptions( const QStringList& app_args, CmdOptions *options )
options->target_url = args.takeLast();
// check if the remote.php/webdav tail was added and append if not.
if( !options->target_url.contains("remote.php/webdav")) {
if(!options->target_url.endsWith("/")) {
options->target_url.append("/");
}
options->target_url.append("remote.php/webdav");
if(!options->target_url.endsWith("/")) {
options->target_url.append("/");
}
if( !options->target_url.contains("remote.php/webdav/")) {
options->target_url.append("remote.php/webdav/");
}
if (options->target_url.startsWith("http"))
options->target_url.replace(0, 4, "owncloud");