<commit_before>module Nehm
  module PathManager
    def self.default_dl_path
      Cfg[:dl_path]
    end

    def self.get_path(path)
      # If path begins with ~
      path = tilde_to_home(path) if tilde_at_top?(path)

      # Check path for existence
      abort 'Invalid download path! Please enter correct path'.red unless Dir.exist?(path)
    end

    def self.set_dl_path
      loop do
        ask_sentence = 'Enter path to desirable download directory'
        default_path = File.join(ENV['HOME'], '/Music')

        if Dir.exist?(default_path)
          ask_sentence << " (press enter to set it to #{default_path.magenta})"
        else
          default_path = nil
        end

        path = HighLine.new.ask(ask_sentence + ':')

        # If user press enter, set path to default
        path = default_path if path == '' && default_path<commit_msg>Fix: PathManager.get_path always return nil<commit_after>module Nehm
  module PathManager
    def self.default_dl_path
      Cfg[:dl_path]
    end

    def self.get_path(path)
      # If path begins with ~
      path = tilde_to_home(path) if tilde_at_top?(path)

      # Check path for existence
      abort 'Invalid download path! Please enter correct path'.red unless Dir.exist?(path)

      path
    end

    def self.set_dl_path
      loop do
        ask_sentence = 'Enter path to desirable download directory'
        default_path = File.join(ENV['HOME'], '/Music')

        if Dir.exist?(default_path)
          ask_sentence << " (press enter to set it to #{default_path.magenta})"
        else
          default_path = nil
        end

        path = HighLine.new.ask(ask_sentence + ':')

        # If user press enter, set path to default
        path = default_path if path == '' && default_path
{'fraction_non_alphanumeric': 0.08720271800679502, 'fraction_numerical': 0.0, 'mean_word_length': 2.4244186046511627, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2325874', 'n_tokens_mistral': 531, 'n_tokens_neox': 515, 'n_words': 156}