src/BandcampDownloader/Model/Track.cs
/// <summary>
/// Returns the file path to be used for the track from the file name format saved in the UserSettings, by
/// replacing the placeholders strings with their corresponding values. The returned file path DOES contain the extension.
/// </summary>
Returns the file path to be used for the track from the file name format saved in the UserSettings, by
replacing the placeholders strings with their corresponding values. The returned file path DOES contain the extension.
Returns the file path to be used for the track from the file name format saved in the UserSettings by replacing the placeholders strings with their corresponding values . The returned file path DOES contain the extension .
private string ParseTrackFilePath() {
            string fileName = ParseTrackFileName();
            string path = Album.Path + "\\" + fileName;
            if (path.Length >= 260) {
                int fileNameMaxLength = 11 - System.IO.Path.GetExtension(path).Length;
                path = Album.Path + "\\" + fileName.Substring(0, fileNameMaxLength) + System.IO.Path.GetExtension(path);
            }
            return path;
        }
private string ParseTrackFilePath ( ) { string fileName = ParseTrackFileName ( ) ; string path = Album . Path + " \\ " + fileName ; if ( path . Length >= 260 ) { int fileNameMaxLength = 11 - System . IO . Path . GetExtension ( path ) . Length ; path = Album . Path + " \\ " + fileName . Substring ( 0 , fileNameMaxLength ) + System . IO . Path . GetExtension ( path ) ; } return path ; }
Returns the file path to be used for the track from the file name format saved in the UserSettings, by
replacing the placeholders strings with their corresponding values.
Returns the file path to be used for the track from the file name format saved in the UserSettings by replacing the placeholders strings with their corresponding values .
// Windows doesn't do well with path + filename >= 260 characters (and path >= 248 characters) // album.Path has been shorten to 247 characters before, so we have 12 characters max left for "\filename.ext", so 11 character max for "filename.ext"