We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7f0524 commit 69a2cd4Copy full SHA for 69a2cd4
plotkicadsch/src/kicadDiff.ml
@@ -14,9 +14,20 @@ let true_fs rootname = TrueFS rootname
14
type differ = Internal of string | Image_Diff
15
16
let fs_mod s r =
17
+ let rel_path = Option.bind r (fun rel_path ->
18
+ if (String.length rel_path > 1) &&
19
+ String.equal (String.sub rel_path ~pos:0 ~len:2) "./" then
20
+ begin
21
+ if String.length rel_path == 2 then
22
+ None
23
+ else
24
+ Some (String.sub rel_path ~pos:2 ~len:(String.length rel_path - 2))
25
+ end
26
27
+ Some rel_path) in
28
match s with
- | GitFS s -> GitFs.make s r
- | TrueFS s -> TrueFs.make s r
29
+ | GitFS s -> GitFs.make s rel_path
30
+ | TrueFS s -> TrueFs.make s rel_path
31
32
let is_suffix ~suffix s =
33
let suff_length = String.length suffix in
0 commit comments