353cc18337
from maintainer Zvezdan Petkovic <zpetkovic at acm.org>
44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
$OpenBSD: patch-uicommon_ml,v 1.1 2005/05/30 19:27:45 sturm Exp $
|
|
Post-release developer patch.
|
|
o Correct quoting of ignored patterns generated by the UI.
|
|
http://lists.seas.upenn.edu/pipermail/unison-hackers/2005-May/000092.html
|
|
--- uicommon.ml.orig Mon Sep 6 15:15:46 2004
|
|
+++ uicommon.ml Fri May 27 16:37:26 2005
|
|
@@ -268,26 +268,28 @@ let quote s =
|
|
| c ->
|
|
buf.[!pos] <- c; pos := !pos + 1
|
|
done;
|
|
- String.sub buf 0 !pos
|
|
+ "{" ^ String.sub buf 0 !pos ^ "}"
|
|
|
|
-let ignorePath path = "Path " ^ (quote (Path.toString path))
|
|
+let ignorePath path = "Path " ^ quote (Path.toString path)
|
|
|
|
let ignoreName path =
|
|
match Path.finalName path with
|
|
- Some name -> "Name " ^ (quote (Name.toString name))
|
|
+ Some name -> "Name " ^ quote (Name.toString name)
|
|
| None -> assert false
|
|
|
|
let ignoreExt path =
|
|
match Path.finalName path with
|
|
Some name ->
|
|
let str = Name.toString name in
|
|
- (try
|
|
- let pos = String.rindex str '.' + 1 in
|
|
+ begin try
|
|
+ let pos = String.rindex str '.' in
|
|
let ext = String.sub str pos (String.length str - pos) in
|
|
- "Name *." ^ (quote ext)
|
|
+ "Name {,.}*" ^ quote ext
|
|
with Not_found -> (* str does not contain '.' *)
|
|
- "Name "^(quote str))
|
|
- | None -> assert false
|
|
+ "Name " ^ quote str
|
|
+ end
|
|
+ | None ->
|
|
+ assert false
|
|
|
|
let addIgnorePattern theRegExp =
|
|
if theRegExp = "Path " then
|