mldonkey-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-users] Re: Re: How to create ed2k links?


From: spiralvoice
Subject: [Mldonkey-users] Re: Re: How to create ed2k links?
Date: Thu, 10 Jun 2004 00:05:21 +0200
User-agent: Xnews/06.07.17

On Mo 31 Mai 2004 09:40:20p Pierre Etchemaite wrote:

> Or "make utils" from the root of MLdonkey sources tree to get an
> ocaml clone of that tool.

Hi,

make ed2k_hash works also.

One thing I noticed using Windows platform:
Running ed2k_hash on write-protected files works:

=======================================================================
ed2k_hash.exe g:\files\holiday\*
  Partial   0 : ABCDEFGHABCDEFGHABCDEFGHABCDEFGH
  Partial   1 : GHGHABCBDGHGHABCBDGHGHABCBDGHGHA
ed2k://|file|g:\files\holiday\AFRICA.JPG|1234567|GHGHABCBDGHGHABCBD|
sig2dat://|File: g:\files\holiday\AFRICA.MP3|Length: 1234567
Bytes|UUHash: ABD(§JDJD(§EJDLFUE|/
    Hash: sdhfsf9sazf9s8afzsd9g7sdgsd89g7sdg
and so on...
=======================================================================

Running on non-write-protected-files produces this:

=======================================================================
ed2k_hash.exe g:\files\holiday\*
  Partial   0 : ABCDEFGHABCDEFGHABCDEFGHABCDEFGH
  Partial   1 : GHGHABCBDGHGHABCBDGHGHABCBDGHGHA
ed2k://|file|g:\files\holiday\AFRICA.JPG|1234567|GHGHABCBDGHGHABCBD|
Fatal error: exception Unix.Unix_error(1, "os_getfilesize", "")
=======================================================================

So it crashes before computing sig2dat hashes.
The funny thing is that calling with "-hash sig2dat" works, calling 
with "-hash bp" fails.

In ed2k_hash.ml we call:
  let fd = Unix32.create_rw filename in

In unix32.ml this happens:
let create_rw filename = create_diskfile filename rw_flag 0o666
let create_ro = create_rw

So files can´t be opened read-only anymore?

Also this tool should *not* put the path of the file into the ed2k-
hash. Replace line 165 in ed2k_hash with this:
    (Filename.basename filename)

- spiralvoice





reply via email to

[Prev in Thread] Current Thread [Next in Thread]