From 591276dd79bc28cca316936ca83bec8d00d42c62 Mon Sep 17 00:00:00 2001 From: Wilmer Ricciotti Date: Wed, 22 Jun 2011 15:20:52 +0000 Subject: [PATCH] Fixes to library dialog box in matitaweb. --- matitaB/matita/matitaFilesystem.ml | 5 +++-- matitaB/matita/matitaweb.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/matitaB/matita/matitaFilesystem.ml b/matitaB/matita/matitaFilesystem.ml index 1ead03f90..798f7f67d 100644 --- a/matitaB/matita/matitaFilesystem.ml +++ b/matitaB/matita/matitaFilesystem.ml @@ -84,7 +84,7 @@ let html_of_library uid = let lpath filename = path ^ "/" ^ filename in let gpath filename = basedir ^ "/" ^ path ^ "/" ^ filename in let dirlist = - List.filter (fun x -> String.sub x 0 1 = ".") + List.filter (fun x -> String.sub x 0 1 <> ".") (Array.to_list (Sys.readdir (basedir ^ "/" ^ path))) in let subdirs = List.filter (fun x -> Sys.is_directory (gpath x)) dirlist in let scripts = @@ -92,7 +92,8 @@ let html_of_library uid = try let i = String.rindex x '.' in let len = String.length x - i in - not (Sys.is_directory (gpath x)) && (String.sub x i len = ".ma") + not (Sys.is_directory (gpath x)) && + (String.sub x 0 1 <> ".") && (String.sub x i len = ".ma") with Not_found | Invalid_argument _ -> false) dirlist in let subdirtags = String.concat "\n" (List.map (fun x -> aux (lpath x)) subdirs) in diff --git a/matitaB/matita/matitaweb.js b/matitaB/matita/matitaweb.js index e785011b5..a5c58c3a2 100644 --- a/matitaB/matita/matitaweb.js +++ b/matitaB/matita/matitaweb.js @@ -459,7 +459,7 @@ function retrieveFile(thefile) } }; dialogBox.style.display = "none"; - callServer("open",processor,"file=" + escape(thefile); + callServer("open",processor,"file=" + escape(thefile)); } function showLibrary() -- 2.39.2