From 4e2dd8530dac9a209e6beeac0e0f789e09b7eaf8 Mon Sep 17 00:00:00 2001 From: Guillaume Piolat Date: Thu, 12 Nov 2020 17:30:41 +0100 Subject: [PATCH] Correct issue #1673 (with dupe #1797 and #2019) --- source/dub/generators/visuald.d | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/dub/generators/visuald.d b/source/dub/generators/visuald.d index 9f9691ac9..2fce35646 100644 --- a/source/dub/generators/visuald.d +++ b/source/dub/generators/visuald.d @@ -228,6 +228,9 @@ class VisualDGenerator : ProjectGenerator { ret.put("\n \n"); logDebug("About to write to '%s.visualdproj' file %s bytes", getPackageFileName(packname), ret.data.length); + auto basepath = NativePath(".dub/"); + if (!isWritableDir(basepath, true)) + throw new Exception(".dub is not writeable"); auto proj = openFile(projFileName(packname), FileMode.createTrunc); scope(exit) proj.close(); proj.put(ret.data);