load_rc: avoid NS_ERROR_FILE_TARGET_DOES_NOT_EXIST in symlink test
commita737e50abcbe0de88f270830f525a882617b0e0a
authorJohn Foerch <jjfoerch@earthlink.net>
Tue, 16 Apr 2013 02:22:42 +0000 (15 22:22 -0400)
committerJohn Foerch <jjfoerch@earthlink.net>
Tue, 16 Apr 2013 02:27:08 +0000 (15 22:27 -0400)
tree8fd20545ed11ed2e92f75209bdef6e82f8a1b307
parent7abe99250c561a08de209bacf6f80078e27b063a
load_rc: avoid NS_ERROR_FILE_TARGET_DOES_NOT_EXIST in symlink test

Previously, if there was no rc, the symlink test on the rc path would
throw NS_ERROR_FILE_TARGET_DOES_NOT_EXIST.  This patch introduces a catch
for that error.

file_symlink_p: new util.  takes an nsIFile and returns the value of
file.isSymlink(), but also catches the error and returns false if the file
does not exist.  Note that this cannot be tested with file.exists(),
because that method automatically resolves symlinks.
modules/rc.js
modules/utils.js