From 11002400952e5341adc9ded20caa016cbb599d1c Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 12 Jan 2015 21:00:14 -0800 Subject: [PATCH] handle git files which are in "" (for utf-8 characters in the filename) --- bibtex_to_paper | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bibtex_to_paper b/bibtex_to_paper index f7ba6cc..8de1f19 100755 --- a/bibtex_to_paper +++ b/bibtex_to_paper @@ -190,8 +190,9 @@ sub load_papers_into_database { my @dirs = ref($dir)?@{$dir}:$dir; if ($options{use_git}) { - my @files = grep /\.pdf$/, split /\n/, qx(git ls-tree HEAD -r --full-name --name-only); + my @files = grep /\.pdf\"?$/, split /\n/, qx(git ls-tree HEAD -r --full-name --name-only); for my $file (@files) { + $file =~ s/^\"(.+)\"$/"qq($1)"/gee; insert_or_replace_papers($dbh,$sth,basename($file),File::Spec->rel2abs($file), -e "${file}.xoj"); } } else { -- 2.39.2