This is a bit tricky.
Pull/Send/Obliterate(which is in Unrecord.hs) all create bundles. They
all parse the options attempting to find a "-o FILE", and then make a
bundle - we should create a single function to write out a given bundle
and get the output name from the options.
The actual failure occurs in Repository/Lock where wordReadableTemp
calls takeFile, which fails due to the stash-2012 "directory" not
existing. I suppose takeFile could/should check that its filepath
argument is valid (though I'm not sure how to do this without attempting
to create the file (which may already exist!)).
It might be nice to do a bit of sanity checking when parsing the
arguments, i.e. when reading a -o flag, check whether the path looks
sane in some central point...
More thinking/investigation required.
|