This commit is contained in:
Daniel Ziltener 2019-12-09 13:59:33 +01:00
parent 1a87b41140
commit 77c588b487
1 changed files with 3 additions and 3 deletions

View File

@ -20,18 +20,18 @@
(defn- set-owner [path owner]
(->
(Files/getFileAttributeView path PosixFileAttributeView LinkOption/NOFOLLOW_LINKS)
(Files/getFileAttributeView path PosixFileAttributeView (into-array LinkOption [LinkOption/NOFOLLOW_LINKS]))
(.setOwner owner)))
(defn- set-group [path group]
(->
(Files/getFileAttributeView path PosixFileAttributeView LinkOption/NOFOLLOW_LINKS)
(Files/getFileAttributeView path PosixFileAttributeView (into-array LinkOption [LinkOption/NOFOLLOW_LINKS]))
(.setGroup group)))
(defn make-dirs! [{:keys [company-name]}]
(let [attrs (Files/readAttributes (.toPath (io/file "srv/http/www.sompani.com"))
PosixFileAttributeView
LinkOption/NOFOLLOW_LINKS)
(into-array LinkOption [LinkOption/NOFOLLOW_LINKS]))
group (.group attrs)
owner (.owner attrs)]
(doseq [dir-str ["/srv/http/staging.%s.talent.careers-cache"