SciLor wrote:
The StartUp function doesn't affect the downloads itself directly (It runs and startup).
Yes, I know. The problem is that StartUp initializes AppPath and/or DownloadDir to something wrong that produces an exception when it is used to create the path where store the downloaded files.
By the way, you used Assembly.GetExecutingAssembly().GetName().CodeBase It may be correct but I would have used Assembly.GetCallingAssembly.ManifestModule.FullyQualifiedName
SciLor wrote:
I would like to know where you have copied the "not working" version on you device. Is it in "\Storage Card\Program Files\GroovesharkDownloader"?)
Yes.
SciLor wrote:
I also I would like to know which error the programs throws!
The exception was a ArgumentException and was raised by the Directory.CreateDirectory here
private void btnDownload_Click(object sender, EventArgs e)
{
Cursor.Current = Cursors.WaitCursor;
this.btnAddToDownload.Enabled = false;
this.btnDownload.Enabled = false;
this.DownloadEnabled = true;
this.pgbAllDownloads.Value = 0;
this.pgbAllDownloads.Maximum = this.lstDownloadList.Items.Count;
int num4 = this.lstDownloadList.Items.Count - 1;
for (int i = 0; i <= num4; i++)
{
string path = Path.Combine(MyStartUp.DownloadDir, Path.Combine(Path.Combine(this.DownloadResults[i].ArtistName, this.DownloadResults[i].AlbumName + "(" + this.DownloadResults[i].Year + ")"), this.DownloadResults[i].ArtistName + " - " + this.DownloadResults[i].Name + " - " + this.DownloadResults[i].AlbumName + "(" + this.DownloadResults[i].Year + ").mp3"));
GroovesharkAudioStream musicStream = this.grooveClient.GetMusicStream(this.DownloadResults[i].SongID);
int num2 = 0;
byte[] buffer = new byte[0x400];
if (!Directory.Exists(Path.GetDirectoryName(path)))
{
Directory.CreateDirectory(Path.GetDirectoryName(path));