                 callback new Error "Can't resolve this conflict!"
             else if file
                 doc._rev = file._rev
+                doc.tags ?= file.tags or []
                 doc.remote ?= file.remote
                 doc.creationDate ?= file.creationDate
                 if @sameBinary file, doc

                doc.size  ?= file.size
                doc.class ?= file.class
                doc.mime  ?= file.mime
                @pouch.db.put doc, callback
            else if file
                @resolveConflict side, doc, callback
            else
                @ensureParentExist side, doc, =>
                    @pouch.db.put doc, callback


                @resolveConflict side, doc, callback
            else if folder
                doc._rev = folder._rev
                doc.tags ?= folder.tags or []
                doc.creationDate ?= folder.creationDate
                if @sameFolder folder, doc
                    callback null
                else
                    @pouch.db.put doc, callback
            else
                doc.tags ?= []
                doc.creationDate ?= new Date
                @ensureParentExist side, doc, =>
                    @pouch.db.put doc, callback
