embulk / embulk/embulk-standards

LocalFileInputPlugin can not access Windows short file name

Open
#39 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Environment:
* Windows 7 (64bit)
* Java 8
* Embulk 0.9.20

When a windows file has a long name (ex. `long_long_name`), it also has a short name (ex. `LONG_L~1`)

If `path_prefix` in YAML is written in the short name style, `LocalFileInputPlugin` will throw `FileNotFoundException`.

    Caused by: java.io.UncheckedIOException: java.io.FileNotFoundException: Directory not found: "C:\test\LONG_L~1" for "C:\test\LONG_L~1\sub"

at org.embulk.standards.LocalFileInputPlugin.getRealCasePathOfDirectoryNoFollowLinks(LocalFileInputPlugin.java:389)
at org.embulk.standards.LocalFileInputPlugin.listFiles(LocalFileInputPlugin.java:163)
at org.embulk.standards.LocalFileInputPlugin.transaction(LocalFileInputPlugin.java:66)
at org.embulk.spi.FileInputRunner.transaction(FileInputRunner.java:62)
at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:507)

I think it is usually no problem, but some tests needs a workaround because `TestingEmbulk#createTempFile` returns a path as the short name style.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.