imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailserver.cpp
changeset 19 b790c5b3d11f
parent 17 ffa62e555b02
child 22 a67f74060682
--- a/imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailserver.cpp	Mon May 03 12:48:51 2010 +0300
+++ b/imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailserver.cpp	Fri May 14 16:10:12 2010 +0300
@@ -538,6 +538,7 @@
         {
         TN_DEBUG1( "CThumbnailServer::StoreThumbnailL() - file doesn't exists anymore, skip store!");
         }
+    
     if( iFetchedChecker )    
         {
         iFetchedChecker->SetFetchResult( aPath, KErrNone );
@@ -558,6 +559,12 @@
         TInt err( iFetchedChecker->LastFetchResult( aPath ) );
         if ( err == KErrNone ) // To avoid useless sql gets that fails for sure
             {
+            // custom sizes are not stored to db, skip fetching
+            if ( aThumbnailSize == ECustomThumbnailSize )
+                {
+                User::Leave( KErrNotFound );
+                }
+        
             TRAP( err, StoreForPathL( aPath )->FetchThumbnailL( aPath, aThumbnail, aData, aThumbnailSize, aOriginalSize) );
             if ( err != KErrNone )
                 {
@@ -568,6 +575,12 @@
         }
     else
         {
+        // custom sizes are not stored to db, skip fetching
+        if ( aThumbnailSize == ECustomThumbnailSize )
+            {
+            User::Leave( KErrNotFound );
+            }
+    
         StoreForPathL( aPath )->FetchThumbnailL( aPath, aThumbnail, aData, aThumbnailSize, aOriginalSize);
         }
     }