Return absolute paths from $native.traverseTree()

Previously relative paths were generated even though
things like fs.list() and fs.listTree() would just
recombine them with the root path.

Closes #391
This commit is contained in:
Kevin Sawicki
2013-03-08 13:42:31 -08:00
parent 110d3719bb
commit 8cf32149b7
5 changed files with 20 additions and 21 deletions

View File

@@ -37,16 +37,16 @@ class Config
templateConfigDirPath = fs.resolve(window.resourcePath, 'dot-atom')
onConfigDirFile = (path) =>
templatePath = fs.join(templateConfigDirPath, path)
configPath = fs.join(@configDirPath, path)
fs.write(configPath, fs.read(templatePath))
relativePath = path.substring(templateConfigDirPath.length + 1)
configPath = fs.join(@configDirPath, relativePath)
fs.write(configPath, fs.read(path))
fs.traverseTree(templateConfigDirPath, onConfigDirFile, (path) -> true)
configThemeDirPath = fs.join(@configDirPath, 'themes')
onThemeDirFile = (path) ->
templatePath = fs.join(bundledThemesDirPath, path)
configPath = fs.join(configThemeDirPath, path)
fs.write(configPath, fs.read(templatePath))
relativePath = path.substring(bundledThemesDirPath.length + 1)
configPath = fs.join(configThemeDirPath, relativePath)
fs.write(configPath, fs.read(path))
fs.traverseTree(bundledThemesDirPath, onThemeDirFile, (path) -> true)
load: ->