                     operationQueue.createFolderLocally doc, done
             , callback
 
-
-
     #
     # Local-to-remote operations
     #

            err = new Error "The doc is invalid: #{JSON.stringify doc}"
            callback err

        unless doc.path?.indexOf('undefined') < 0
            pouch.db.remove doc, (err) ->
                err = new Error "The doc was invalid: #{JSON.stringify doc}"
                callback err

            err = new Error "The doc is invalid: #{JSON.stringify doc}"
            callback err

        else if doc.path?.indexOf('undefined') >= 0
            pouch.db.remove doc, (err) ->
                err = new Error "The doc was invalid: #{JSON.stringify doc}"
                callback err
