<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -151,7 +151,7 @@ def connect_input(input):
                 host = this_host()
                 if input.startswith(&quot;chunkfile://&quot;):
                         is_chunk = True
-                        local_file = input[12:]
+                        local_file = LOCAL_PATH + input[12:]
                 elif input.startswith(&quot;file://&quot;):
                         local_file = input[7:]
                 else:</diff>
      <filename>node/disconode/disco_worker.py</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,20 @@
 import os, sys, imp, cStringIO
 from disco.netstring import decode_netstring_fd
-from disco.core import Job, result_iterator
-from disconode import disco_worker
+from disco.core import Job, result_iterator, util
+
+def parse_dir(dir):
+        x, x, LOCAL_PATH = util.load_conf()
+        x, x, x, mode, path = dir.split(&quot;/&quot;, 4)
+        res = []
+        for f in os.listdir(LOCAL_PATH + path):
+                if not (f.startswith(mode) or &quot;.&quot; in f):
+                        continue
+                proto = f.split(&quot;-&quot;)[1]
+                if proto == &quot;chunk&quot;:
+                        res.append(&quot;chunkfile://%s%s&quot; % (path, f))
+                elif proto == &quot;disco&quot;:
+                        res.append(&quot;disco://localhost/%s%s&quot; % (path, f))
+        return res
 
 class MsgStream:
         def __init__(self):
@@ -9,11 +22,7 @@ class MsgStream:
         def write(self, msg):
                 if msg.startswith(&quot;**&lt;OUT&gt;&quot;):
                         addr = msg.split()[-1]
-                        fname = &quot;/&quot;.join(addr.split(&quot;/&quot;)[-2:])
-                        if addr.startswith(&quot;chunk://&quot;):
-				self.out.append(&quot;chunkfile://data/&quot; + fname)
-                        else:
-				self.out.append(&quot;file://data/&quot; + fname)
+                        self.out = parse_dir(addr)
                 print msg,
 
 class DummyDisco:
@@ -32,9 +41,11 @@ class HomeDisco:
 
                 argv_backup = sys.argv[:]
                 out_backup = sys.stderr
-                sys.argv = [&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;localhost&quot;, &quot;&quot;, self.partition]
+                sys.argv = [&quot;&quot;, &quot;&quot;, job.name, &quot;localhost&quot;,
+                            &quot;http://nohost&quot;, self.partition]
                 sys.argv += kwargs[&quot;input&quot;]
-                disco_worker.job_name = job.name
+                
+                from disconode import disco_worker
 
                 sys.stderr = out = MsgStream()
                 try:</diff>
      <filename>util/homedisco.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>db80c590394eaf327912f60057ba2503ebc751f5</id>
    </parent>
  </parents>
  <author>
    <name>Ville Tuulos</name>
    <email>tuulos@nxfront.nokiapaloalto.com</email>
  </author>
  <url>http://github.com/tuulos/disco/commit/caf78f7735673140d15cdc9e9aa1d990248a99b2</url>
  <id>caf78f7735673140d15cdc9e9aa1d990248a99b2</id>
  <committed-date>2009-05-26T00:56:53-07:00</committed-date>
  <authored-date>2009-05-26T00:56:53-07:00</authored-date>
  <message>bugfix: fixed homedisco regression in 0.2. Closes #5. Closes #10</message>
  <tree>c0c5e85ee04696f5defe4fde73e461744083c39b</tree>
  <committer>
    <name>Ville Tuulos</name>
    <email>tuulos@nxfront.nokiapaloalto.com</email>
  </committer>
</commit>
