private void reInitialiseProjectSpine() { m_Xuk_FilePath = GetXukFilePath(m_outDirectory, m_Book_FilePath, null, true); //deleteDataDirectoryIfEmpty(); string dataDir = m_Project.Presentations.Get(0).DataProviderManager.DataFileDirectoryFullPath; DebugFix.Assert(Directory.Exists(dataDir)); // because the call to DataFileDirectoryFullPath creates it!! if (Directory.Exists(dataDir)) { string[] files = Directory.GetFiles(dataDir); if (files == null || files.Length == 0) { string error = FileDataProvider.DeleteDirectory(dataDir); if (!string.IsNullOrEmpty(error)) { Console.WriteLine("Problem trying to delete folder (" + error + "): " + dataDir); } } } initializeProject(@"_" + Path.GetFileName(m_Book_FilePath)); }