Skip to content
This repository was archived by the owner on Jun 2, 2019. It is now read-only.

Commit 138ba6c

Browse files
committed
Fix translation to Windows paths; CodeLite expects Unix path separators.
1 parent bb078ad commit 138ba6c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

codelite_workspace.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
-- Build a relative path from the workspace file to the project file
4444
local prjpath = p.filename(prj, ".project")
45-
prjpath = path.translate(path.getrelative(prj.workspace.location, prjpath))
45+
prjpath = path.getrelative(prj.workspace.location, prjpath)
4646

4747
local active = iif(prj.name == wks.startproject, ' Active="Yes"', '')
4848
_x(1, '<Project Name="%s" Path="%s"%s/>', prj.name, prjpath, active)

tests/test_codelite_workspace.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
test.capture([[
9999
<?xml version="1.0" encoding="UTF-8"?>
100100
<CodeLite_Workspace Name="MyWorkspace" Database="" SWTLW="No">
101-
<Project Name="MyProject" Path="]] .. path.translate("MyProject\\MyProject.project") .. [["/>
101+
<Project Name="MyProject" Path="]] .. path.translate("MyProject/MyProject.project") .. [["/>
102102
<BuildMatrix>
103103
<WorkspaceConfiguration Name="Debug" Selected="yes">
104104
<Project Name="MyProject" ConfigName="Debug"/>
@@ -117,7 +117,7 @@
117117
test.capture([[
118118
<?xml version="1.0" encoding="UTF-8"?>
119119
<CodeLite_Workspace Name="MyWorkspace" Database="" SWTLW="No">
120-
<Project Name="MyProject" Path="]] .. path.translate("..\\MyProject\\MyProject.project") .. [["/>
120+
<Project Name="MyProject" Path="]] .. path.translate("../MyProject/MyProject.project") .. [["/>
121121
<BuildMatrix>
122122
<WorkspaceConfiguration Name="Debug" Selected="yes">
123123
<Project Name="MyProject" ConfigName="Debug"/>

0 commit comments

Comments
 (0)