DeathfireD / AllianceP2P

Alliance takes the best from BitTorrent, Direct Connect and Waste and creates a decentralized and secure p2p network. It is a private and secure environment to share files and communicate with people you know. Alliance works on Windows, Linux and Mac.
12 stars 8 forks source link

Comparing checksum instead of file length #15

Open s3b- opened 11 years ago

s3b- commented 11 years ago

You should create checksums of the alliance.tmp file and your jar file instead of just comparing their file lengths.

abonander commented 11 years ago

You're talking about the updater, right?

s3b- commented 11 years ago

I don't know. :D I think it's the UI launcher. Or something like that.

AllianceP2P / branches / latest / src / org / alliance / launchers / ui / Main.java

There. In the main method you're looking for a alliance.tmp file. If it's the same size you're deleting it, if not, you call your updater. I'm not familiar with alliance, sorry.

DeathfireD commented 11 years ago

Ya, that's checking if there's an updated alliance version. Checksums might be a better option for this. I'm pretty sure Bastvera updated Alliance to look at the Google Code wiki for updates though...I could be wrong since I never had a hand in that part.

abonander commented 11 years ago

@DeathfireD Wouldn't it be simpler to have explicit version numbers?