@@ -106,12 +106,30 @@ with multiview.GraphModification(graph):
106106 """Utility method for parsing the input and inputRecursive arguments."""
107107 mapInputs = {}
108108 for inp in inputs :
109- inputGroup = inp .split (':' )
109+ # Stop after the first occurrence to handle multiple input paths on Windows platforms
110+ inputGroup = inp .split (':' , 1 )
110111 nodeName = None
111112 if len (inputGroup ) == 1 and uniqueInitNode :
112113 nodeName = uniqueInitNode .getName ()
113114 elif len (inputGroup ) == 2 :
115+ # If inputGroup[0] is a valid node name, use it as such.
116+ if (inputGroup [0 ] in graph .toDict ().keys ()):
117+ nodeName = inputGroup [0 ]
118+ # Otherwise, the platform might be Windows and inputGroup[0] is part of the input path:
119+ # in that case, we should behave as if len(inputGroup) == 1, use the uniqueInitNode's name
120+ # and re-join the path together.
121+ elif uniqueInitNode :
122+ nodeName = uniqueInitNode .getName ()
123+ inputGroup = [":" .join (inputGroup )]
124+ else :
125+ print ('Syntax error in input argument' )
126+ # If a node name has been provided and the platform is Windows, the length of inputGroup might be
127+ # 3: first the node name, then the first path of the input path, then the rest of the input path.
128+ # The input path should also be re-joined here.
129+ elif len (inputGroup ) == 3 :
114130 nodeName = inputGroup [0 ]
131+ inputGroup [1 ] = ":" .join (inputGroup [1 :])
132+ inputGroup .pop (- 1 )
115133 else :
116134 print ('Syntax error in input argument' )
117135 sys .exit (1 )
0 commit comments