[eclipse-devel] Re : Re : when ~/.eclipse is already present as a directory

Iban HATCHONDO hatchond at yahoo.fr
Fri Apr 23 14:53:42 UTC 2010


Hi,

Thanks for pointing this out.
I've committed a fix by adding a new predicate 'file-exists-p' that is used in the initialize sequence instead of probing the file directly.

(defun file-exists-p (filename)
  "Returns true if the given filename is an existing file and not a directory."
  (and #+clisp (not (probe-directory (make-pathname :directory filename)))
       #-clisp (not (probe-file (make-pathname :directory filename)))
       (probe-file filename)))

Best,
Iban


----- Message d'origine ----
De : Iban HATCHONDO <hatchond at yahoo.fr>
À : eclipse-devel at common-lisp.net
Envoyé le : Ven 23 avril 2010, 1 h 21 min 30 s
Objet : [eclipse-devel] Re : when ~/.eclipse is already present as a directory

Hi,

Yes you're right ! The .eclipse directory created by the IDE is in the way. 
Wouldn't it more portable to do (not (probe-file (make-pathname :directory f))) ?

Best,
Iban.



----- Message d'origine ----
De : david thompson <thompdump at gmail.com>
À : eclipse-devel at common-lisp.net
Envoyé le : Jeu 22 avril 2010, 18 h 44 min 44 s
Objet : [eclipse-devel] when ~/.eclipse is already present as a directory

With my first run of eclipse, eclipse discovered that ~/.eclipse
is a directory and ground to a halt with

couldn't read from #<SB-SYS:FD-STREAM for "file /.../.eclipse" {AF2B2E9}>:
  Is a directory

Maybe having eclipse gracefully switch gears -- e.g., something like
the change below (in INITIALIZE) --  would be desirable?

...
      ;; load personal configuration file, or the default one.
      (labels ((load-if (f)
         (and (probe-file f)
              ;; try to ensure  ~/.eclipse isn't a directory...
              (not (probe-file (concatenate 'string f "/.")))
              (load-config-file f))))
...

_______________________________________________
eclipse-devel site list
eclipse-devel at common-lisp.net
http://common-lisp.net/mailman/listinfo/eclipse-devel



      


_______________________________________________
eclipse-devel site list
eclipse-devel at common-lisp.net
http://common-lisp.net/mailman/listinfo/eclipse-devel



      





More information about the eclipse-devel mailing list