mirror of
https://github.com/munki/munki.git
synced 2026-05-06 20:39:30 -05:00
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:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user