Skip to content

Fix build failure when PublicizerLogFilePath is a bare filename - #198

Merged
krafs merged 1 commit into
mainfrom
fix-bare-logfilepath
Jul 22, 2026
Merged

Fix build failure when PublicizerLogFilePath is a bare filename#198
krafs merged 1 commit into
mainfrom
fix-bare-logfilepath

Conversation

@krafs

@krafs krafs commented Jul 22, 2026

Copy link
Copy Markdown
Owner

A relative PublicizerLogFilePath with no directory portion (e.g. publicizer.log) failed the build: Path.GetDirectoryName returns "", Directory.CreateDirectory("") throws, and the catch reports it via LogError, which fails compilation. The directory is now created only when the path has one.

Regression test: a project with a bare log filename builds successfully and writes the log.

Path.GetDirectoryName of a bare filename returns an empty string, and
Directory.CreateDirectory then throws ArgumentException. The catch logged
it via LogError, failing the build instead of writing the log beside the
project. Skip directory creation when there is no directory portion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant