def validate_safedir(root, value, default):
 if (sabnzbd.WIN32 and value and (len(sabnzbd.misc.real_path(root, value)) >= MAX_WIN_DFOLDER)):
  return ((T('Error: Path length should be below %s.') % MAX_WIN_DFOLDER), None)
 if sabnzbd.empty_queues():
  return validate_no_unc(root, value, default)
 else:
  return (T('Error: Queue not empty, cannot change folder.'), None)

def validate_safedir ( root , value , default ) : if ( sabnzbd . WIN32 and value and ( len ( sabnzbd . misc . real_path ( root , value ) ) >= MAX_WIN_DFOLDER ) ) : return ( ( T ( 'Error: Path length should be below %s.' ) % MAX_WIN_DFOLDER ) , None ) if sabnzbd . empty_queues ( ) : return validate_no_unc ( root , value , default ) else : return ( T ( 'Error: Queue not empty, cannot change folder.' ) , None )
allow only when queues are empty and no unc on windows path should be small .