Copy File


#1

in juce_CopyFile() on the mac I added:

[code]
if (okForks > 0) // some files seem to be ok even if not all their forks get copied…
{
const char* const srcUTF8 = src.toUTF8();

	struct stat info;
	const int res = stat (srcUTF8, &info);
	if (res == 0)
	{
		info.st_mode &= 0777;   // Just permissions

		const char* const dstUTF8 = dst.toUTF8();
		bool ok = chmod (dstUTF8, info.st_mode) == 0;
	}
	return true;
}
else
{
	return false;
}[/code]

Do you see any reason not to add it? It allows me to copy bundles and still run them.


#2

Yes, seems extremely sensible to me!


#3

I found another bug:

should be

Or files with spaces won’t launch.


#4

Oh right - thanks for that one too.


#5