mirror of https://github.com/sbt/sbt.git
Remove potentially unsafe optimization in local resolver
Old implementation of the local resolver did not copy directory if it was writable. This optimization can lead to some potential problems if the directory is writable, but its subdirectories aren't. New implementation of the local resolver does not have this optimization and it always copies the directory into staging area.
This commit is contained in:
parent
5ed012c7d9
commit
837d973fd3
|
|
@ -19,9 +19,7 @@ object Resolvers
|
|||
val from = new File(uri)
|
||||
val to = uniqueSubdirectoryFor(uri, in = info.staging)
|
||||
|
||||
if (from.isDirectory)
|
||||
if (from.canWrite) Some {() => from}
|
||||
else Some {() => creates(to) {IO.copyDirectory(from, to)}}
|
||||
if (from.isDirectory) Some {() => creates(to) {IO.copyDirectory(from, to)}}
|
||||
else None
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue