On 19/03/2018 17:34, Xiao Lei wrote:

I would like to change the default Coot download folder path (let's say after fetch a pdb, Coot saved the pdb in the default download folder). I looked into the Edit--> Preferences in Coot and I could not find a place to change the PATH.  How could I find this option in Coot?


You could create a link from your chosen directory to coot-download in the current directory before coot creates the directory.

Alternatively, you could use the dirty hack attached - edit it to set the directory that you choose and put this script in your ~/.coot-preferences directory.

Paul.

(define (my-chosen-download-directory)
  "/home/xiaolei/coot-download" ;; or some such
)

(define (get-directory dir-name)

  (if (string? dir-name)
      (if (string=? dir-name "coot-download")
          (set! dir-name (my-chosen-download-directory))))

  (if (file-exists? dir-name)

      (if (is-directory? dir-name)
          dir-name
          #f)

      (let ((status (make-directory-maybe dir-name)))

        (if (= status 0)
            dir-name

            (let ((h (getenv "HOME")))
              (if (not (string? h))
                  #f ;; couldnt find home.  Baah.
                  (begin
                    (let ((new-dir (append-dir-dir h dir-name)))
                      (let ((status (make-directory-maybe new-dir)))
                        (if (= status 0)
                            new-dir
                            #f))))))))))

Reply via email to