def folders_to_path(folders):
    """
    Convert list of folders to a path.

    :param folders: List of folders, None denotes a root folder e.g. [None, 'NAS', 'Music', 'By Folder', 'folder1']
    :returns: path string e.g. /NAS/Music/By Folder/folder1
    """
    if not folders:
        return '/'

    if folders[0] is None:
        folders[0] = ''

    return '/'.join(folders) or '/'