Skip to content

Commit

Permalink
Fix Pkg.Cache paths, closes #5615 and #5612
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Jan 30, 2014
1 parent 80f106b commit 3b87dca
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions base/pkg/cache.jl
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
module Cache

import ..Git
import ..Dir
using ..Types

import ..Dir: pkgroot, path
import ..Dir: pkgroot

path(pkg::String) = abspath(".cache", pkg)

function mkcachedir()
cache = realpath(abspath(".cache"))
cache = joinpath(realpath("."), ".cache")
if isdir(cache)
return
end

@windows_only mkdir(cache)
@unix_only begin
rootcache = realpath(joinpath(pkgroot(), ".cache"))
rootcache = joinpath(realpath(pkgroot()), ".cache")
if rootcache == cache
mkdir(cache)
elseif isdir(rootcache)
Expand Down

0 comments on commit 3b87dca

Please sign in to comment.