show only the path substring within the user space (not the REST path) - was too...
authorfstamatelopoulos <devnull@localhost>
Thu, 19 Mar 2009 14:25:16 +0000 (14:25 +0000)
committerfstamatelopoulos <devnull@localhost>
Thu, 19 Mar 2009 14:25:16 +0000 (14:25 +0000)
user can get it from the file properties dialog

gss/src/gr/ebs/gss/client/SearchResults.java

index 93d592b..828827e 100644 (file)
@@ -177,7 +177,7 @@ public class SearchResults extends Composite implements TableListener, ClickList
                                        if(getSelectedFiles().size() == 1){\r
                                                FileResource file = getSelectedFiles().get(0);\r
                                                String dateString = AbstractRestCommand.getDate();\r
-                                               String resource = file.getPath().substring(GSS.GSS_REST_PATH.length()-1,file.getPath().length());\r
+                                               String resource = URL.decodeComponent(file.getPath().substring(GSS.GSS_REST_PATH.length()+file.getOwner().length()+6,file.getPath().length()-file.getName().length()));\r
                                                String sig = GSS.get().getCurrentUserResource().getUsername()+" "+AbstractRestCommand.calculateSig("GET", dateString, resource, AbstractRestCommand.base64decode(GSS.get().getToken()));\r
                                                Window.open(file.getPath() + "?Authorization=" + URL.encodeComponent(sig) + "&Date="+URL.encodeComponent(dateString), "_blank", "");\r
                                        }\r