<div dir="ltr"><a href="https://pharo.fogbugz.com/f/cases/12073/Writing-jpeg-files-to-disk">https://pharo.fogbugz.com/f/cases/12073/Writing-jpeg-files-to-disk</a><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Nov 5, 2013 at 11:34 AM, Usman Bhatti <span dir="ltr"><<a href="mailto:usman.bhatti@gmail.com" target="_blank">usman.bhatti@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hello,<div><br></div><div>Due to the changes in Pharo 3.0, I cannot write jpeg files on the disk. This happens because when writing a jpeg file, we delete any precedent version of the file to be exported. However, now DiskStore>>delete: throws an exception when the file to be deleted is not present</div>

<div><br></div><div><div>delete: path</div><div><span style="white-space:pre-wrap">   </span>| pathString encodedPathString |</div><div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>(self exists: path)</div>

<div><span style="white-space:pre-wrap">          </span>ifFalse: [ ^ FileDoesNotExist signalWith: path ].</div><div><span style="white-space:pre-wrap">                </span></div><div><span style="white-space:pre-wrap"> ...</span></div>
</div><div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">Hence, we need to fix PluginBasedJPEGReadWriter>>putForm: quality: progressiveJPEG: onFileNamed:</span><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> to not delete files not present.</span></div>

<div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">To reproduce the problem:</span></div><div><span style="white-space:pre-wrap">Display writeJPEGfileNamed: 'display.jpeg' progressive: true</span><br>

</div><div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">If confirmed, I'll open a bug report and propose a slice because correction is quite simple ;)</span></div><div><span style="white-space:pre-wrap"><br>

</span></div><div><span style="white-space:pre-wrap">regards,</span></div><div><span style="white-space:pre-wrap">Usman </span><br></div></div>
</blockquote></div><br></div>