@@ -447,15 +447,28 @@ ownCloudZimlet.prototype._newFolderCallback = function(folder, input, dialog, ev
447
447
new AjxCallback ( this , function ( dialog , result ) {
448
448
var zimletInstance = appCtxt . _zimletMgr . getZimletByName ( 'tk_barrydegraaff_owncloud_zimlet' ) . handlerObject ;
449
449
450
- zimletInstance . OwnCloudFolderPicker . _davConnector . propfind (
451
- zimletInstance . OwnCloudFolderPicker . selectedDavResource . getHref ( ) ,
452
- 1 ,
453
- new AjxCallback (
454
- zimletInstance . OwnCloudFolderPicker ,
455
- zimletInstance . OwnCloudFolderPicker . _renderPropFind ,
456
- [ zimletInstance . OwnCloudFolderPicker . selectedDavResource . getHref ( ) , zimletInstance . OwnCloudFolderPicker . selectedTreeObj ]
457
- ) , zimletInstance . OwnCloudFolderPicker . _zimletCtxt . _defaultPropfindErrCbk
458
- ) ;
450
+ try {
451
+ zimletInstance . OwnCloudFolderPicker . _davConnector . propfind (
452
+ zimletInstance . OwnCloudFolderPicker . selectedDavResource . getHref ( ) ,
453
+ 1 ,
454
+ new AjxCallback (
455
+ zimletInstance . OwnCloudFolderPicker ,
456
+ zimletInstance . OwnCloudFolderPicker . _renderPropFind ,
457
+ [ zimletInstance . OwnCloudFolderPicker . selectedDavResource . getHref ( ) , zimletInstance . OwnCloudFolderPicker . selectedTreeObj ]
458
+ ) , zimletInstance . OwnCloudFolderPicker . _zimletCtxt . _defaultPropfindErrCbk
459
+ ) ;
460
+ } catch ( err )
461
+ {
462
+ zimletInstance . OwnCloudFolderPicker = new OwnCloudFolderPicker (
463
+ zimletInstance . _folderPickerDialog ,
464
+ zimletInstance ,
465
+ zimletInstance . _davConnector ,
466
+ zimletInstance . _ownCloudConnector ,
467
+ new OwnCloudCommons ( zimletInstance . _davConnector , zimletInstance . _ownCloudConnector )
468
+ ) ;
469
+ document . getElementById ( 'ownCloudZimletFolderPicker' ) . innerHTML = "" ;
470
+ zimletInstance . OwnCloudFolderPicker . reparentHtmlElement ( document . getElementById ( 'ownCloudZimletFolderPicker' ) ) ;
471
+ }
459
472
460
473
dialog . popdown ( ) ;
461
474
} , [ dialog ] )
0 commit comments