SoftwareFoundationGroupAtKyotoU / automata

Other
3 stars 10 forks source link

提出できない形式のzipファイルが存在する #232

Closed westpaddy closed 9 years ago

westpaddy commented 9 years ago

提出できるやつ

$ unzip -l hoge.zip
Archive:  hoge.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  03-28-2015 18:13   hoge/
        4  03-28-2015 18:17   hoge/hoge.txt
---------                     -------
        4                     2 files

できないやつ

$ unzip -l fuga.zip
Archive:  fuga.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        4  03-28-2015 18:17   hoge/hoge.txt
---------                     -------
        4                     1 file

ディレクトリそのもののエントリが含まれていないと展開できないようです。 unzipとかではどっちも展開できるので、rubyzipの不具合か使い方が間違っている?

krtx commented 9 years ago

hoge/hoge.txt に展開しようとしたけど、hoge/ というディレクトリがないのでエラーになっているように見える

krtx commented 9 years ago

http://www.markhneedham.com/blog/2008/10/02/ruby-unzipping-a-file-using-rubyzip/ これで直りそう