updatecheck.fileSystemItemExists(item) now returns true when given a path to a symlink if the symlink exists but the item it points to does not. Previously it returned false if the target was missing.

git-svn-id: http://munki.googlecode.com/svn/trunk@1105 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2011-04-11 18:18:13 +00:00
parent f17935640c
commit 80c7bd1243
+4 -2
View File
@@ -465,13 +465,15 @@ def filesystemItemExists(item):
(or there is no checksum)
Returns -1 if the filesystem item exists but the checksum does not match.
Broken symlinks are OK; we're testing for the existence of the symlink,
not the item it points to.
Raises munkicommon.Error is there's a problem with the input.
"""
if 'path' in item:
filepath = item['path']
munkicommon.display_debug1('Checking existence of %s...' % filepath)
if os.path.exists(filepath):
if os.path.lexists(filepath):
munkicommon.display_debug2('\tExists.')
if 'md5checksum' in item:
storedchecksum = item['md5checksum']