diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-01-26 16:49:23 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-01-26 16:49:23 +0000 |
commit | d756a1598af47ac63d6c49006eaeb6dba91b55c2 (patch) | |
tree | f2d018cf4d8c828e3e32d14b14e405a14bd5682b /desktop | |
parent | 83b22dd6a7f7909976e3a9df9fa371db82e011ac (diff) |
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:
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/misc/dp_ucb.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
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<XInterface>(), ContentCreationError_UNKNOWN ); + return false; + } ::ucb::Content parentContent; if (! create_folder( &parentContent, url.copy( 0, slash ), xCmdEnv, throw_exc )) |