diff options
-rw-r--r-- | src/mbgl/util/io.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mbgl/util/io.cpp b/src/mbgl/util/io.cpp index f37ce09cff..0820f7d517 100644 --- a/src/mbgl/util/io.cpp +++ b/src/mbgl/util/io.cpp @@ -6,8 +6,6 @@ #include <sstream> #include <fstream> -#include <unistd.h> - namespace mbgl { namespace util { @@ -33,8 +31,8 @@ std::string read_file(const std::string &filename) { } void deleteFile(const std::string& filename) { - const int ret = unlink(filename.c_str()); - if (ret == -1) { + const int ret = std::remove(filename.c_str()); + if (ret != 0) { throw IOException(errno, "failed to unlink file"); } } |