mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-07 00:53:41 +08:00
fix bug occuring with unexpected filenames in var/maps
This commit is contained in:
+3
-3
@@ -145,10 +145,10 @@ let get_from_cache = fun f ->
|
||||
let rec loop = fun i ->
|
||||
if i < Array.length files then
|
||||
let fi = files.(i) in
|
||||
let fi_key = Filename.chop_extension fi in
|
||||
if try is_prefix fi_key f with _ -> false then begin
|
||||
let fi_key = try Filename.chop_extension fi with _ -> fi in
|
||||
if fi_key <> "" && is_prefix fi_key f then
|
||||
(tile_of_key fi_key, !cache_path // fi)
|
||||
end else
|
||||
else
|
||||
loop (i+1)
|
||||
else
|
||||
raise Not_found in
|
||||
|
||||
Reference in New Issue
Block a user