So I found the solution we used before... is there a reason this code
hasn't been changed?  Is there a better way to do what I want to do?

Here is the solution we used:

Yes, you have to modify lib/galaxy/objectstore/__init__.py:

 In class DiskObjectStore find the function 'update_from_file' (line ~340)
and replace:

             try:
                shutil.copy(file_name, self.get_filename(obj, **kwargs))
            except IOError, ex:
                log.critical('Error copying %s to %s: %s' % (file_name,
                    self._get_filename(obj, **kwargs), ex))

 by:

             try:
                if os.path.isdir(file_name):
                    dir_name = self._get_filename(obj, **kwargs)
                    os.remove(dir_name)
                    shutil.copytree(file_name, dir_name)
                else:
                    shutil.copy(file_name, self.get_filename(obj, **kwargs))
            except IOError, ex:
                log.critical('Error copying %s to %s: %s' % (file_name,
                    self._get_filename(obj, **kwargs), ex))

- Nik.


On Thu, Mar 28, 2013 at 7:06 PM, Nikhil Joshi <najo...@ucdavis.edu> wrote:

> Hi all,
>
> So I have a tool that I am writing a wrapper script for that produces a
> directory of images as one of its outputs.  This directory gets created
> just fine in the job_working_directory, but then when the job finishes and
> the contents of the job_working_directory are copied, the copy of the
> images directory is a zero-length *file*.  I seem to recall having this
> problem before and finding a solution to it, but now I can't seem to find
> it.  Any ideas?
>
> - Nik.
>
> --
> Nikhil Joshi
> Bioinformatics Analyst/Programmer
> UC Davis Bioinformatics Core
> http://bioinformatics.ucdavis.edu/
> najoshi -at- ucdavis -dot- edu
> 530.752.2698 (w)
>



-- 
Nikhil Joshi
Bioinformatics Analyst/Programmer
UC Davis Bioinformatics Core
http://bioinformatics.ucdavis.edu/
najoshi -at- ucdavis -dot- edu
530.752.2698 (w)
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Reply via email to