def is_local_src_dir(directory):
if not is_string(directory):<EOL><INDENT>return False<EOL><DEDENT>abs_dir = os.path.abspath(directory)<EOL>c = os.path.commonprefix([os.getcwd(), abs_dir])<EOL>new_dir = abs_dir[len(c):].split(os.sep)<EOL>if new_dir and not new_dir[<NUM_LIT:0>]:<EOL><INDENT>new_dir = new_dir[<NUM_LIT:1>:]<EOL><DEDENT>if new_dir and new_dir[<NUM_LIT:0>]=='<STR_LIT>':<EOL><INDENT>return False<EOL><DEDENT>new_dir = os.sep.join(new_dir)<EOL>return os.path.isdir(new_dir)<EOL>
Return true if directory is local directory.