mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-24 04:12:47 +03:00
Use boost::filesystem for "rm -rf".
Replaces a system() call (which was a portability problem) and fixes, en passant, a warning about its return value being ignored.
This commit is contained in:
parent
789a2e2bc3
commit
b124d99330
@ -1,5 +1,7 @@
|
||||
// vim:tabstop=2
|
||||
#include <cstdlib>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include "PhraseDictionaryTransliteration.h"
|
||||
#include "moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h"
|
||||
#include "moses/DecodeGraph.h"
|
||||
@ -104,9 +106,7 @@ void PhraseDictionaryTransliteration::GetTargetPhraseCollection(InputPath &input
|
||||
|
||||
// clean up temporary files
|
||||
remove(inFile.c_str());
|
||||
|
||||
cmd = "rm -rf " + outDir;
|
||||
system(cmd.c_str());
|
||||
boost::filesystem::remove_all(outDir);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user