mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
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:
@@ -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: ->
|
||||
|
||||
Reference in New Issue
Block a user