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

Commit

Permalink
Fix translation to Windows paths; CodeLite expects Unix path separators.
Browse files Browse the repository at this point in the history
  • Loading branch information
TurkeyMan committed Apr 15, 2016
1 parent bb078ad commit 138ba6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion codelite_workspace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

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

local active = iif(prj.name == wks.startproject, ' Active="Yes"', '')
_x(1, '<Project Name="%s" Path="%s"%s/>', prj.name, prjpath, active)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_codelite_workspace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
test.capture([[
<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Workspace Name="MyWorkspace" Database="" SWTLW="No">
<Project Name="MyProject" Path="]] .. path.translate("MyProject\\MyProject.project") .. [["/>
<Project Name="MyProject" Path="]] .. path.translate("MyProject/MyProject.project") .. [["/>
<BuildMatrix>
<WorkspaceConfiguration Name="Debug" Selected="yes">
<Project Name="MyProject" ConfigName="Debug"/>
Expand All @@ -117,7 +117,7 @@
test.capture([[
<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Workspace Name="MyWorkspace" Database="" SWTLW="No">
<Project Name="MyProject" Path="]] .. path.translate("..\\MyProject\\MyProject.project") .. [["/>
<Project Name="MyProject" Path="]] .. path.translate("../MyProject/MyProject.project") .. [["/>
<BuildMatrix>
<WorkspaceConfiguration Name="Debug" Selected="yes">
<Project Name="MyProject" ConfigName="Debug"/>
Expand Down

0 comments on commit 138ba6c

Please sign in to comment.