dfs: fix the variable definition bug in copy, found by ffgamelife from rt-thread.org