+ return HandleDeleteFile(cc, t)
+}
+
+func HandleDownloadFileWithUserFolders(cc *hotline.ClientConn, t *hotline.Transaction) (res []hotline.Transaction) {
+ requestedPath, err := hotline.ReadPath(cc.FileRoot(), t.GetField(hotline.FieldFilePath).Data, nil)
+ if err != nil {
+ return res
+ }
+
+ resolvedPath, err := ResolveUserPath(cc, requestedPath[len(cc.FileRoot())+1:])
+ if err != nil {
+ return cc.NewErrReply(t, "Cannot download non-existent user file.")
+ }
+
+ updateTransactionPath(t, resolvedPath)
+ return HandleDownloadFile(cc, t)
+}
+
+func HandleDownloadFolderWithUserFolders(cc *hotline.ClientConn, t *hotline.Transaction) (res []hotline.Transaction) {
+ requestedPath, err := hotline.ReadPath(cc.FileRoot(), t.GetField(hotline.FieldFilePath).Data, nil)
+ if err != nil {
+ return res
+ }
+
+ resolvedPath, err := ResolveUserPath(cc, requestedPath[len(cc.FileRoot())+1:])
+ if err != nil {
+ return cc.NewErrReply(t, "Cannot download non-existent user folder.")
+ }
+
+ updateTransactionPath(t, resolvedPath)
+ return HandleDownloadFolder(cc, t)