Branch: Tag:

2016-03-21

2016-03-21 10:05:55 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Filesystem: Decode the file names returned by get_dir().

Fixes some of [bug 7659 (#7659)].

569:       dir = Array.filter(dir, dir_filter_function, id);    +  if (path_encoding != "iso-8859-1") { +  dir = map(dir, decode_path); +  } +     if (!id->misc->internal_get)    foreach (internal_files, string globstr)    dir -= glob (globstr, dir);
582:    SIMPLE_TRACE_ENTER(this, "Deleting all files in directory %O...", real_dir);    foreach(get_dir(real_dir) || ({}), string fname) {    string real_fname = combine_path(real_dir, fname); -  string virt_fname = virt_dir + "/" + fname; +  string virt_fname = virt_dir + "/" + decode_path(fname);       Stat stat = file_stat(real_fname);    if (!stat) {