logo separator

[mkgmap-dev] Commit: r2679: With output-dir does not exist can result in error.

From svn commit svn at mkgmap.org.uk on Thu Aug 29 21:42:33 BST 2013

Version 2679 was committed by steve on Thu, 29 Aug 2013

With output-dir does not exist can result in error.

If more than one thread then there is a race between testing the existence of the
directory and creating it. Creating it results in an error if it already exists and
the original code would fallback to the default directory on seeing this error.

The correct logic is to attempt to create the directory and ignore errors (which is what
mkdirs() does anyway), then make sure that the directory exists afterwards.


More information about the mkgmap-dev mailing list