Layer name checks.
git-svn-id: http://svn.robofab.com/branches/ufo3k@359 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
This commit is contained in:
parent
215e39c6ae
commit
e0e56d0318
@ -737,7 +737,12 @@ def layerContentsValidator(value, ufoPath):
|
||||
return False, bogusFileMessage
|
||||
layerName, directoryName = entry
|
||||
if not directoryName.startswith("glyphs"):
|
||||
return False, bogusFileMessage
|
||||
return False, "Invalid directory name (%s) in layercontents.plist." % directoryName
|
||||
if directoryName != "glyphs":
|
||||
if not directoryName.startswith("glyphs."):
|
||||
return False, "Invalid directory name (%s) in layercontents.plist." % directoryName
|
||||
if len(layerName) == 0:
|
||||
return False, "Empty layer name in layercontents.plist."
|
||||
# directory doesn't exist
|
||||
p = os.path.join(ufoPath, directoryName)
|
||||
if not os.path.exists(p):
|
||||
|
Loading…
x
Reference in New Issue
Block a user