diff options
Diffstat (limited to 'src/com/android/camera/ImageManager.java')
-rwxr-xr-x | src/com/android/camera/ImageManager.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/camera/ImageManager.java b/src/com/android/camera/ImageManager.java index 4a83958..cc76e83 100755 --- a/src/com/android/camera/ImageManager.java +++ b/src/com/android/camera/ImageManager.java @@ -73,6 +73,18 @@ public class ImageManager { public static String getBucketId(String path) { return String.valueOf(path.toLowerCase().hashCode()); } + + /** + * OSX requires plugged-in USB storage to have path /DCIM/NNNAAAAA to be imported. + * This is a temporary fix for bug#1655552. + */ + public static void ensureOSXCompatibleFolder() { + File nnnAAAAA = new File( + Environment.getExternalStorageDirectory().toString() + "/DCIM/100ANDRO"); + if ((!nnnAAAAA.exists()) && (!nnnAAAAA.mkdir())) { + Log.e(TAG, "create NNNAAAAA file: "+ nnnAAAAA.getPath()+" failed"); + } + } // To enable verbose logging for this class, change false to true. The other logic ensures that // this logging can be disabled by turned off DEBUG and lower, and that it can be enabled by |