Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -N -r1.182 -r1.183 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 27 Oct 2009 11:30:28 -0000 1.182 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 31 Oct 2009 22:04:59 -0000 1.183 @@ -192,15 +192,15 @@ # will be found by the object resolver. For the time being, we # do nothing more about this. - # TODO: on the longer ranger, this should not be required, but we have - # to solve the folder object problem first... - if {[::xo::db::sql::content_folder is_folder -item_id $parent_id]} { - set queryClass ::xo::db::CrFolder - } else { - set queryClass ::xo::db::CrClass - } set path "" while {1} { + # TODO: on the longer range, this should not be required, but we have + # to solve the folder object problem first... + if {[::xo::db::sql::content_folder is_folder -item_id $parent_id]} { + set queryClass ::xo::db::CrFolder + } else { + set queryClass ::xo::db::CrClass + } set fo [$queryClass get_instance_from_db -item_id $parent_id] set path [$fo name]/$path if {[my folder_id] == [$fo parent_id]} break @@ -276,7 +276,11 @@ set package_prefix [my package_url] } #my msg "lang=$lang, default_lang=$default_lang, name=$name" - + + if {$parent_id eq -100} { + return ${host}${package_prefix}$query$anchor + } + set encoded_name [string map [list %2d - %5f _ %2e .] [ns_urlencode $name]] set folder [my folder_path -parent_id $parent_id] Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -N -r1.366 -r1.367 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 27 Oct 2009 11:30:28 -0000 1.366 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 31 Oct 2009 22:04:59 -0000 1.367 @@ -1256,15 +1256,19 @@ set parent_id [$package_id folder_id] set name "" - if {[regexp {^:(..):(.*)$} $link _ lang stripped_name]} { + if {[regexp {^:(..):(.+)$} $link _ lang stripped_name]} { # language link (it starts with a ':') set link_type language - } elseif {[regexp {^(file|image|js|css|swf):(.*)$} $link _ \ + } elseif {[regexp {^(file|image|js|css|swf|folder):(.+)$} $link _ \ link_type stripped_name]} { # (typed) file links set lang "" - set name file:$stripped_name - } elseif {[regexp {^\./(.*)/$} $link _ stripped_name]} { + if {$link_type ne "folder"} { + set name file:$stripped_name + } else { + set name $stripped_name + } + } elseif {[regexp {^\./(.+)/$} $link _ stripped_name]} { # relative folder link, starting with a "./", ending with a "/" set link_type folder set lang ""