diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-03-19 09:50:33 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:12:55 +0300 |
commit | 1f680ef4fa110ad982fc88955b90d96eb2c7285a (patch) | |
tree | c9b211e42e95a2cdb9f7e7b0181cfb33327c5a54 /skin_generator | |
parent | 136e54a332da44772835ab57c19dd36630a36688 (diff) |
review fix
Diffstat (limited to 'skin_generator')
-rw-r--r-- | skin_generator/skin_generator.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/skin_generator/skin_generator.cpp b/skin_generator/skin_generator.cpp index 77c2e0ddb6..6689fc5f92 100644 --- a/skin_generator/skin_generator.cpp +++ b/skin_generator/skin_generator.cpp @@ -337,16 +337,8 @@ namespace tools } } string extName = ".sdf"; - QFile::remove(QString((skinName + extName).c_str())); - - if (QFile::exists((skinName + extName).c_str())) - throw std::exception(); - QFile file(QString((skinName + extName).c_str())); - - LOG(LINFO, ("writing skin into ", skinName + extName)); - - if (!file.open(QIODevice::ReadWrite)) + if (!file.open(QIODevice::ReadWrite | QIODevice::Truncate)) throw std::exception(); QTextStream ts(&file); ts.setCodec("UTF-8"); |