From 91933b4b2729225ffe63e9ab89ef89c6d4d867b8 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Wed, 27 Sep 2017 13:36:23 +0200 Subject: [PATCH] use file.exists to check file existance isFile is only useful to distinguish between files and folders, and will throw an exception if the file doesn't exist. In 0.6.6 it always aborts with an exception unless the archive is already present. --- src/asgen/zarchive.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asgen/zarchive.d b/src/asgen/zarchive.d index 3c05c687..bb8c8011 100644 --- a/src/asgen/zarchive.d +++ b/src/asgen/zarchive.d @@ -459,7 +459,7 @@ void compressAndSave (ubyte[] data, const string fname, ArchiveType atype) archive_write_close (ar); // delete old file if it exists - if (fname.isFile) + if (std.file.exists (fname)) fname.remove (); // rename temporary file to actual file std.file.rename (tmpFname, fname); // we need to use std.file explicitly, because otherwise core.stdc gets used