Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible A2 bug: identical version names cause export to be cancelled



Fraser,

I see this too. The behavior I get is different though. In my case the existing files are overwritten (or at least touched -- their dates are updated) and no error is reported. I use these lines to write the data out:

// Store the image data in the file
MLogString(1,@"Writing file");
flag = [imageData writeToFile:fullpath atomically:NO];
MLogString(1,(flag?@"Successful":@"Failed"));

I get this in my log:
2/18/08 3:54:07 PM Aperture[1089] 1 Random_Wok.m:388 exportManagerShouldWriteImageData relativePath:IMG_6573-2008-02-17.jpg index 0
2/18/08 3:54:07 PM Aperture[1089] 1 Random_Wok.m:393 Writing file
2/18/08 3:54:07 PM Aperture[1089] 1 Random_Wok.m:395 Successful
2/18/08 3:54:08 PM Aperture[1089] 1 Random_Wok.m:388 exportManagerShouldWriteImageData relativePath:IMG_6572-2008-02-17.jpg index 1
2/18/08 3:54:08 PM Aperture[1089] 1 Random_Wok.m:393 Writing file
2/18/08 3:54:08 PM Aperture[1089] 1 Random_Wok.m:395 Successful
2/18/08 3:54:11 PM Aperture[1089] 1 Random_Wok.m:388 exportManagerShouldWriteImageData relativePath:IMG_6565-2008-02-17.jpg index 2
2/18/08 3:54:11 PM Aperture[1089] 1 Random_Wok.m:393 Writing file
2/18/08 3:54:11 PM Aperture[1089] 1 Random_Wok.m:395 Successful



On Feb 18, 2008, at 2:59 PM, Fraser Speirs wrote:

Hi All,

I've already filed this bug in Radar (#5749684), but I'm reposting it here in the hope that it will save other developers some time. If you also see this problem with your plugin, it might be worth filing a bug and referencing my bug number.

========================
Summary: Under Aperture 2, export plugins which attempt to export two versions which have the same name collide and Aperture 2 cancels the export. Aperture 2 makes no attempt to suffix file names that potentially collide.


Steps to Reproduce:

1. Create an export plugin that returns NO to -wantsFileNamingControls
2. Select two versions in Aperture 2 and batch-change their Version Name field to the same value.
3. Attempt to export these versions through an Export plugin.
4. The export will fail with a message like:


"Aperture was not able to write image data to disk for “Bar.jpg”. A file of the same name may already exist in the target directory (/ Users/fspeirs/Library/Application Support/FlickrExport/Aperture/ ResizeCache/Bar.jpg), or you may not have permission to write files to this location, or there may be insufficient disk space."

Expected Results:

Under Aperture 1.5, colliding files would have their file name appended with (1), (2), etc. Aperture 2 appears to make no attempt to prevent file names colliding for plugins that do not present file naming controls to the user.

Actual results:

Aperture presents the "Error Writing Image to Disk" text mentioned in step 4 above.

Regression:

Plugins which exhibit this problem under Aperture 2 work correctly under Aperture 1.5.6.

Notes:

The problem of potentially colliding file names is handled correctly by Aperture 2 when exporting versions to disk via File > Export > Versions. In that case, colliding file names will be appended with (1), (2), etc.

If a plugin does present file naming controls, the error message is still presented if the selected file naming preset does not use a counter or other means of distinguishing files (e.g. date, counter, etc.).

Aperture 1.5.6 handled this correctly for export plugins and version exports. Plugins that operated correctly under Aperture 1.5.6 do not handle this situation correctly under Aperture 2.

There is no workaround to this problem, since the AperturePluginProtocol does not give plugins the opportunity to suggest alternative paths on a per-file basis.
========================


Best,
Fraser
--
http://speirs.org -- http://connectedflow.com


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Aperture-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/aperture-dev/bagelturf %40mac.com


This email sent to email@hidden

-- Blog: http://www.bagelturf.com/ Photos: http://bagelturf.smugmug.com/




_______________________________________________ Do not post admin requests to the list. They will be ignored. Aperture-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/aperture-dev/email@hidden

This email sent to email@hidden
References: 
 >Possible A2 bug: identical version names cause export to be cancelled (From: Fraser Speirs <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.