~ken-vandine/gwibber/lp_949395

« back to all changes in this revision

Viewing changes to libgwibber-gtk/stream-view-tile.vala

  • Committer: Ken VanDine
  • Date: 2012-03-14 20:58:13 UTC
  • mfrom: (1311.2.1 fix-845374)
  • Revision ID: ken.vandine@canonical.com-20120314205813-n23i7t9xh7rjmcmm
Use the SHA1 hash of the avatar URL instead of simply stripping the slashes, to avoid the resulting filename being too long to be created on ecryptfs volumes.  Thanks James Tait (LP: #845374)

Show diffs side-by-side

added added

removed removed

Lines of Context:
916
916
          b.add (avatar);
917
917
          avatar.show ();
918
918
 
919
 
          var cimage = Path.build_path (Path.DIR_SEPARATOR_S, Environment.get_user_cache_dir(), "gwibber/avatars", url.replace("/",""));
 
919
          var cimage = Path.build_path (Path.DIR_SEPARATOR_S, Environment.get_user_cache_dir(), "gwibber/avatars", GLib.Checksum.compute_for_string(GLib.ChecksumType.SHA1, url));
920
920
          t = "png";
921
921
          if (cimage.has_suffix ("JPG") || cimage.has_suffix ("jpeg") || cimage.has_suffix ("jpg"))
922
922
            t = "jpeg";