From a72a79a992f460c8108ec94d876c4306382ffb60 Mon Sep 17 00:00:00 2001 From: Gary Knight Date: Thu, 30 Jul 2026 12:46:04 -0400 Subject: [PATCH] Normalize Windows backslashes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Windows, fileSystemUtil.makePathRelative() returns paths using backslash separators (e.g. resources\database\migrations\). The previous fix attempted to normalize these with replace( path, "\\", "/", "all" ), but in CFML "\\" is a two-character string literal matching double backslashes \\ — not the single backslashes \ that Windows paths actually contain. As a result, the replace was a no-op on Windows and the bug persisted. This fix corrects the string literal to "\" (single backslash) in all three affected locations: setup() — migrationsDirectory normalization setup() — seedsDirectory normalization setMigrationPath() — direct directory setter This change has no effect on Mac or Linux, where makePathRelative() already returns forward-slash paths and the replace() is a no-op either way. --- models/BaseMigrationCommand.cfc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/BaseMigrationCommand.cfc b/models/BaseMigrationCommand.cfc index 58ee82f..57b04e2 100644 --- a/models/BaseMigrationCommand.cfc +++ b/models/BaseMigrationCommand.cfc @@ -46,7 +46,7 @@ component { fileSystemUtil.makePathRelative( fileSystemUtil.resolvePath( settings.migrationsDirectory ) ), - "\\", + "\", "/", "all" ); @@ -56,7 +56,7 @@ component { fileSystemUtil.makePathRelative( fileSystemUtil.resolvePath( settings.seedsDirectory ) ), - "\\", + "\", "/", "all" ); @@ -124,7 +124,7 @@ component { fileSystemUtil.makePathRelative( fileSystemUtil.resolvePath( migrationsDirectory ) ), - "\\", + "\", "/", "all" );