@@ -129,11 +129,11 @@ handleContent tempODT sourceDirRelative content@(Elem el) = do
129129 then do
130130 let pref = take 230 $ concat $ intersperse "_" $
131131 splitDirectories $ takeDirectory $ attrVal href
132− let newLoc = "Pictures" </> pref ++ "_" ++ (takeFileName $ attrVal href)
132+ let picName = pref ++ "_" ++ (takeFileName $ attrVal href)
133133 let tempDir = takeDirectory tempODT
134− createDirectoryIfMissing False $ tempDir </> takeDirectory newLoc
135− copyFile oldLoc $ tempDir </> newLoc
136− let newAttrs = (href { attrVal = newLoc }) : rest
134+ createDirectoryIfMissing False $ tempDir </> "Pictures"
135+ copyFile oldLoc $ tempDir </> "Pictures" </> picName
136+ let newAttrs = (href { attrVal = "Pictures/" ++ picName }) : rest
137137 return $ Elem (el { elAttribs = newAttrs })
138138 else do
139139 hPutStrLn stderr $ "Warning: Unable to find image at " ++ oldLoc ++ " - ignoring."