From d756a1598af47ac63d6c49006eaeb6dba91b55c2 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Thu, 26 Jan 2006 16:49:23 +0000 Subject: INTEGRATION: CWS sb46 (1.8.100); FILE MERGED 2006/01/17 10:51:58 dbo 1.8.100.1: #i49437# - assume no office running when user installation path does not exist - reject to create folder when invalid url is given Issue number: Submitted by: Reviewed by: --- desktop/source/deployment/misc/dp_ucb.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'desktop') diff --git a/desktop/source/deployment/misc/dp_ucb.cxx b/desktop/source/deployment/misc/dp_ucb.cxx index e61f8326a5d9..865f75ec7d52 100644 --- a/desktop/source/deployment/misc/dp_ucb.cxx +++ b/desktop/source/deployment/misc/dp_ucb.cxx @@ -4,9 +4,9 @@ * * $RCSfile: dp_ucb.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: rt $ $Date: 2005-09-08 17:25:11 $ + * last change: $Author: hr $ $Date: 2006-01-26 17:49:23 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -111,6 +111,14 @@ bool create_folder( url = expandUnoRcUrl( url ); slash = url.lastIndexOf( '/' ); } + if (slash < 0) { + // invalid: has to be at least "auth:/..." + if (throw_exc) + throw ContentCreationException( + OUSTR("Cannot create folder (invalid path): ") + url, + Reference(), ContentCreationError_UNKNOWN ); + return false; + } ::ucb::Content parentContent; if (! create_folder( &parentContent, url.copy( 0, slash ), xCmdEnv, throw_exc )) -- cgit