jcustenborder / kafka-connect-spooldir

Kafka Connect connector for reading CSV files into Kafka.
Apache License 2.0
165 stars 124 forks source link

Relative file path is not retrieved properly #206

Open yesh11891 opened 1 year ago

yesh11891 commented 1 year ago

Existing (InputFile.java): Path relative = inputFile.toPath().relativize(inputPath.toPath());

Fix (InputFile.java): Path relative = inputFile.toPath().relativize(inputPath.getParentFile().toPath());

odsock commented 1 year ago

This issue seems to cause an error message like this for every file I drop in: [2023-03-05 00:21:16,144] ERROR [CsvSchemaSpoolDir|task-0] Failed to delete input.path sub-directory: /Users/mburnham/Projects/kafka-poc/data/input/data9.TXT (com.github.jcustenborder.kafka.connect.spooldir.InputFile:240)

I see the same error running the test suite as well. I'll try to create a PR to fix it and add a test.

lavalex commented 5 months ago

Hello,

I'm running into this issue. Was it fixed? Will it be fixed?