private void updateBundlesDirtyState ( List < JoinableResourceBundle > bundles , CssSmartSpritesResourceReader cssSpriteResourceReader ) { for ( JoinableResourceBundle bundle : bundles ) { List < BundlePath > bundlePaths = bundle . getItemPathList ( ) ; for ( BundlePath bundlePath : bundlePaths ) { String path = bundlePath . getPath ( ) ; File stdFile = cssSpriteResourceReader . getGeneratedCssFile ( path ) ; File bckFile = cssSpriteResourceReader . getBackupFile ( path ) ; if ( bckFile . exists ( ) ) { try { if ( ! FileUtils . contentEquals ( stdFile , bckFile ) ) { bundle . setDirty ( true ) ; break ; } } catch ( IOException e ) { throw new BundlingProcessException ( "Issue while generating smartsprite bundle" , e ) ; } } cssSpriteResourceReader . getResource ( bundle , path ) ; } } }
Update the bundles dirty state