Commit 5f3f64eb authored by Jojo Boulix's avatar Jojo Boulix
Browse files

Bugfix: fix problems when using non-ascii paths with auto association and mailing.

parent 32a80af9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@ GetOptions("notes-id=s"=>\$notes_id,

set_debug($debug);

utf8::downgrade($liste_file);
utf8::downgrade($data_dir);

die "Needs notes-id" if(!$notes_id && !$preassoc);
die "Needs liste-key" if(!$liste_key);
die "Needs liste_file" if(! -s $liste_file);
+7 −0
Original line number Diff line number Diff line
@@ -95,6 +95,9 @@ GetOptions("project=s"=>\$project_dir,

set_debug($debug);

utf8::downgrade($students_list);
utf8::downgrade($ids_file);

debug "Parameters: ".join(" ",map { "<$_>" } @ARGV_ORIG);

sub error {
@@ -111,6 +114,7 @@ sub parse_add {
}

$data_dir="$project_dir/data" if($project_dir && !$data_dir);
utf8::downgrade($data_dir);

error("students list not found:$students_list") if(!-f $students_list);

@@ -155,6 +159,7 @@ $data->begin_read_transaction('Mail');
my $subdir=$report->get_dir(REPORT_ANNOTATED_PDF);

my $pdf_dir="$project_dir/$subdir";
utf8::downgrade($pdf_dir);

error("PDF directory not found: $pdf_dir") if(!-d $pdf_dir);

@@ -231,6 +236,8 @@ STUDENT: for my $i (@$r) {
  }
  if($dest) {
    my $file=$pdf_dir.'/'.$i->{'file'};
    utf8::downgrade($file);

    debug "  FILE=$file";
    if(-f $file) {
      my $body='';