def trim_win_path(path):
 if (sabnzbd.WIN32 and (len(path) > 69)):
  (path, folder) = os.path.split(path)
  maxlen = (69 - len(path))
  if (len(folder) > maxlen):
   folder = folder[:maxlen]
  path = os.path.join(path, folder).rstrip('. ')
 return path

def trim_win_path ( path ) : if ( sabnzbd . WIN32 and ( len ( path ) > 69 ) ) : ( path , folder ) = os . path . split ( path ) maxlen = ( 69 - len ( path ) ) if ( len ( folder ) > maxlen ) : folder = folder [ : maxlen ] path = os . path . join ( path , folder ) . rstrip ( '. ' ) return path
make sure windows path stays below 70 by trimming last part .