<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "CFFILE MOVE fails if source and destination are not in same filesystem (patch inside)"]]></title>
		<link>http://www.smithproject.org/forum/posts/list/10.page</link>
		<description><![CDATA[Latest messages posted in the topic "CFFILE MOVE fails if source and destination are not in same filesystem (patch inside)"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>CFFILE MOVE fails if source and destination are not in same filesystem (patch inside)</title>
				<description><![CDATA[ Hello,

I scratched my head over this one for a long time. Java's File.moveTo(), which Smith uses to move files, fails when the source and destination files are in directories in different filesystems.

In FileTagImpl.java, in the private void move() method, I modified the last code block as follows:
<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>		if &#40;!source.equalsIgnoreCase&#40;destination&#41; && !s.renameTo&#40;new_file&#41;&#41; {
			new_file.delete&#40;&#41;;
			if &#40;!s.renameTo&#40;new_file&#41;&#41; {
				// file.renameTo&#40;&#41; does not work across different filesystems,
				// so we have to copy the file and then delete the source instead.
				try {
					this.copyFile&#40;source, destination&#41;;
					s.delete&#40;&#41;;
				} catch &#40;Exception ex&#41; {
					throw new ApplicationException&#40;new ErrMsg&#40;
							"error.misc.invalid_variable", source, "FILE"&#41;&#41;;
				}
			}
		}
</pre>
		</div>]]></description>
				<guid isPermaLink="true">http://www.smithproject.org/forum/posts/list/148.page#525</guid>
				<link>http://www.smithproject.org/forum/posts/list/148.page#525</link>
				<pubDate><![CDATA[Fri, 1 Feb 2008 22:35:12]]> GMT</pubDate>
				<author><![CDATA[ Cars2007]]></author>
			</item>
			<item>
				<title>Re:CFFILE MOVE fails if source and destination are not in same filesystem (patch inside)</title>
				<description><![CDATA[ Hi Cars,
thanks for the patch! We will test and apply this.

Note that we have a bug/patch/feature_request tracker at SourceForge.net
(<a href="http://sourceforge.net/projects/smithos/" target="_new" rel="nofollow">http://sourceforge.net/projects/smithos/</a>, just click on Tracker in the menu). That's the best place to post these little things.

Thanks for testing and helping Smith become a better product!
Best regards,
orcus


]]></description>
				<guid isPermaLink="true">http://www.smithproject.org/forum/posts/list/148.page#528</guid>
				<link>http://www.smithproject.org/forum/posts/list/148.page#528</link>
				<pubDate><![CDATA[Sat, 2 Feb 2008 16:27:26]]> GMT</pubDate>
				<author><![CDATA[ orcus]]></author>
			</item>
			<item>
				<title>Re:CFFILE MOVE fails if source and destination are not in same filesystem (patch inside)</title>
				<description><![CDATA[ Patch tested and applied... available in SVN, will be included in the next build.

Thanks Cars!]]></description>
				<guid isPermaLink="true">http://www.smithproject.org/forum/posts/list/148.page#634</guid>
				<link>http://www.smithproject.org/forum/posts/list/148.page#634</link>
				<pubDate><![CDATA[Thu, 6 Mar 2008 13:56:57]]> GMT</pubDate>
				<author><![CDATA[ orcus]]></author>
			</item>
	</channel>
</rss>