Switch to full style
Discussions about Coollector.
Post a reply

Re: Portable on hdd

Tue Mar 15, 2011 2:58 pm

(cool) Hector wrote:This solution is even simpler


How?

Re: Portable on hdd

Tue Mar 15, 2011 3:06 pm

kakashi wrote:Serial #?

Sorry, I don't understand what you mean.

Re: Portable on hdd

Tue Mar 15, 2011 3:09 pm

kakashi wrote:
(cool) Hector wrote:This solution is even simpler


How?

It's technically simpler, because I still don't know how to obtain the name of a drive. It's also simpler for the users because they have nothing to do, it works in all cases, they can rename their drive if they want, etc...

Re: Portable on hdd

Tue Mar 15, 2011 3:13 pm

Information about a volume includes driveletter, drivelabel/name, and its serial number
http://en.wikipedia.org/wiki/Volume_serial_number

I guess you didn't use the serial number then.

Might i ask: what did you use? (thats what i meant by asking how. Your solution seems much simpler)

Re: Portable on hdd

Tue Mar 15, 2011 3:17 pm

Even if I knew how to get the drive name, this name hasn't been saved, we currently have only a letter, so I have no way to determine if a drive has changed or not.

Re: Portable on hdd

Tue Mar 15, 2011 3:20 pm

kakashi wrote:Might i ask: what did you use? (thats what i meant by asking how. Your solution seems much simpler)

Oh, ok, now I understand.

I said that my solution was simple because it's ridiculously simple.

Before displaying a file path, I check if the file really exists. If the file doesn't seem to exist, then I check the 25 other possible drive letters, and if I finally find the file, I just have to correct the path.

Re: Portable on hdd

Tue Mar 15, 2011 3:26 pm

:rofl: it crossed my mind.

It was impossible for me to test and silly at best.
I cant believe you actually tried it.
Post a reply