diff --git a/lib/file_system/backends/fs_mac.ex b/lib/file_system/backends/fs_mac.ex index 6e53d2370c8d1e33411ac9ba135892d62da62d05..267c0106b8e8fb6412167fd2af06636a48b2d5bd 100644 --- a/lib/file_system/backends/fs_mac.ex +++ b/lib/file_system/backends/fs_mac.ex @@ -170,7 +170,7 @@ defmodule FileSystem.Backends.FSMac do end def parse_line(line) do - [_, _, events, path] = line |> to_string |> String.split(["\t", "="]) + [_, _, events, path] = line |> to_string |> String.split(["\t", "="], parts: 4) {path, events |> String.split(~w|[ , ]|, trim: true) |> Enum.map(&String.to_existing_atom/1)} end diff --git a/test/backends/fs_mac_test.exs b/test/backends/fs_mac_test.exs index 38edb4a750bf0a214a0fe2efb9c7d865d876b325..67a504abe3cf708bdc50972ecc7dd2f822209a16 100644 --- a/test/backends/fs_mac_test.exs +++ b/test/backends/fs_mac_test.exs @@ -32,5 +32,10 @@ defmodule FileSystem.Backends.FSMacTest do assert {"/one two/file", [:inodemetamod, :modified]} == parse_line('37425557\t0x00011400=[inodemetamod,modified]\t/one two/file') end + + test "equal character in file" do + assert {"/one two/file=2", [:inodemetamod, :modified]} == + parse_line('37425557\t0x00011400=[inodemetamod,modified]\t/one two/file=2') + end end end