From 3a10c5604a2cbc5d284a17578280e96c93f61e63 Mon Sep 17 00:00:00 2001 From: zookzook Date: Mon, 2 Jan 2023 13:54:11 +0100 Subject: [PATCH] fix: use the basename of the file path --- lib/mongo/migration.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongo/migration.ex b/lib/mongo/migration.ex index a094428a..6c93cdc6 100644 --- a/lib/mongo/migration.ex +++ b/lib/mongo/migration.ex @@ -170,7 +170,7 @@ defmodule Mongo.Migration do version = ~r/[0-9]/ - |> Regex.scan(file) + |> Regex.scan(Path.basename(file)) |> Enum.join() |> String.to_integer()