Skip to content

Commit

Permalink
Fixed bug in parsing of paths on Unix.
Browse files Browse the repository at this point in the history
  • Loading branch information
CuppoJava committed Jul 30, 2024
2 parents c305b7b + 84e737a commit b93c6f6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion compiler/params.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public defn compiler-flags () :
to-tuple(COMPILE-FLAGS)

;========= Stanza Configuration ========
public val STANZA-VERSION = [0 18 89]
public val STANZA-VERSION = [0 18 90]
public var STANZA-INSTALL-DIR:String = ""
public var OUTPUT-PLATFORM:Symbol = `platform
public var STANZA-PKG-DIRS:List<String> = List()
Expand Down
3 changes: 2 additions & 1 deletion compiler/proj-normalization.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ public defn normalize (v:ProjValue,
current-platform:Symbol,
current-link-type:Symbol,
workdir:String,
stanzadir:String,
proj-path:String) -> ProjValue :
val dirtable = SpecialDirTable(workdir, proj-path)
val dirtable = SpecialDirTable(proj-path, workdir = workdir, stanzadir = stanzadir)
normalize(v, current-platform, current-link-type, dirtable)

;============================================================
Expand Down
2 changes: 1 addition & 1 deletion compiler/proj.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public defn read-proj-files (filenames:Seqable<String>,
fn (v, t:ValueType, projpath:String, errors:Vector<ProjFileError>) -> ProjValue :
v $> translate-to-proj-value
$> variable-substitution{_, vartable, errors}
$> normalize{_, platform, link-type, workdir(env), projpath}
$> normalize{_, platform, link-type, workdir(env), stanzadir(env), projpath}

;Stage: Finish all postprocessing stages to get files into final form.
defn sub-variables-and-finish-processing (files:Tuple<ProjFileS0>,
Expand Down
8 changes: 2 additions & 6 deletions core/parsed-path.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,8 @@ defmethod parse-path (path:String, platform:OS-X|Linux) -> ParsedPath :
make-path-element()
loop(i + 1)
'\\' :
if i + 1 < len :
add(buffer, path[i + 1])
loop(i + 2)
else :
add(buffer, c)
loop(i + 1)
make-path-element()
loop(i + 1)
else :
add(buffer, c)
loop(i + 1)
Expand Down

0 comments on commit b93c6f6

Please sign in to comment.