+
+func HandleDeleteFileWithUserFolders(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 upload to non-existent user folder.")
+ }
+
+ updateTransactionPath(t, resolvedPath)
+ return HandleUploadFolder(cc, t)
+}