aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/plugin/desktoputil/presence
diff options
context:
space:
mode:
authorIngo Bauersachs <ingo@jitsi.org>2013-12-08 16:36:42 +0100
committerIngo Bauersachs <ingo@jitsi.org>2013-12-08 16:36:42 +0100
commit77afb677645651af0f4e57f48d824baa474f8f19 (patch)
tree42446d5273ecc9c483468fcc970c019473a193a9 /src/net/java/sip/communicator/plugin/desktoputil/presence
parent5baad8c1adbca88a49a0cce225c820f67f9340d0 (diff)
downloadjitsi-77afb677645651af0f4e57f48d824baa474f8f19.zip
jitsi-77afb677645651af0f4e57f48d824baa474f8f19.tar.gz
jitsi-77afb677645651af0f4e57f48d824baa474f8f19.tar.bz2
Use cache directory for avatars
Diffstat (limited to 'src/net/java/sip/communicator/plugin/desktoputil/presence')
-rw-r--r--src/net/java/sip/communicator/plugin/desktoputil/presence/avatar/AvatarStackManager.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/net/java/sip/communicator/plugin/desktoputil/presence/avatar/AvatarStackManager.java b/src/net/java/sip/communicator/plugin/desktoputil/presence/avatar/AvatarStackManager.java
index 3a81a24..2a72080 100644
--- a/src/net/java/sip/communicator/plugin/desktoputil/presence/avatar/AvatarStackManager.java
+++ b/src/net/java/sip/communicator/plugin/desktoputil/presence/avatar/AvatarStackManager.java
@@ -45,8 +45,7 @@ public class AvatarStackManager
{
File imageFile
= DesktopUtilActivator.getFileAccessService()
- .getPrivatePersistentFile(
- fileName);
+ .getPrivatePersistentFile(fileName, FileCategory.CACHE);
if (imageFile.exists() && !imageFile.delete())
logger.error("Failed to delete stored image at index " + index);
@@ -73,8 +72,7 @@ public class AvatarStackManager
imageFile
= DesktopUtilActivator.getFileAccessService().
- getPrivatePersistentFile(
- imagePath);
+ getPrivatePersistentFile(imagePath, FileCategory.CACHE);
}
catch (Exception e)
{
@@ -110,11 +108,13 @@ public class AvatarStackManager
try
{
FileAccessService fas = DesktopUtilActivator.getFileAccessService();
- File oldFile = fas.getPrivatePersistentFile(oldImagePath);
+ File oldFile = fas.getPrivatePersistentFile(oldImagePath,
+ FileCategory.CACHE);
if (oldFile.exists())
{
- File newFile = fas.getPrivatePersistentFile(newImagePath);
+ File newFile = fas.getPrivatePersistentFile(newImagePath,
+ FileCategory.CACHE);
oldFile.renameTo(newFile);
}
@@ -149,12 +149,14 @@ public class AvatarStackManager
try
{
FileAccessService fas = DesktopUtilActivator.getFileAccessService();
- File storeDir = fas.getPrivatePersistentDirectory(STORE_DIR);
+ File storeDir = fas.getPrivatePersistentDirectory(STORE_DIR,
+ FileCategory.CACHE);
// if dir doesn't exist create it
storeDir.mkdirs();
- File file = fas.getPrivatePersistentFile(imagePath);
+ File file = fas.getPrivatePersistentFile(imagePath,
+ FileCategory.CACHE);
ImageIO.write(image, "png", file);
}