{- | Sets the list of files for a given disc to the passed list. -}
setFilesRec :: Connection -> String -> [FileRec] -> IO ()
setFilesRec conn discid frlist = handleSqlError $
    inTransaction conn (\tconn -> do wipeFiles tconn discid
                                     mapM_ (addFileRec tconn discid) frlist
                  )
setFilesRec :: Connection -> String -> [FileRec] -> IO ()
setFilesRec conn discid frlist = handleSqlError $
    inTransaction conn (\tconn -> do wipeFiles tconn discid
                                     mapM_ (addFileRec tconn discid) frlist
                  )
setFilesRec conn discid frlist = handleSqlError $
    inTransaction conn (\tconn -> do wipeFiles tconn discid
                                     mapM_ (addFileRec tconn discid) frlist
                  )