Rename cache folders
This commit is contained in:
@@ -2054,14 +2054,14 @@ public class ImageLoader {
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 30) {
|
||||
File newPath = ApplicationLoader.applicationContext.getExternalFilesDir(null);
|
||||
telegramPath = new File(newPath, "Telegram");
|
||||
telegramPath = new File(newPath, "exteraGram");
|
||||
// File oldPath = new File(path, "Telegram");
|
||||
// long moveStart = System.currentTimeMillis();
|
||||
// moveDirectory(oldPath, telegramPath);
|
||||
// long dt = System.currentTimeMillis() - moveStart;
|
||||
// FileLog.d("move time = " + dt);
|
||||
} else {
|
||||
telegramPath = new File(path, "Telegram");
|
||||
telegramPath = new File(path, "exteraGram");
|
||||
}
|
||||
telegramPath.mkdirs();
|
||||
|
||||
@@ -2071,7 +2071,7 @@ public class ImageLoader {
|
||||
File dir = dirs.get(a);
|
||||
if (dir.getAbsolutePath().startsWith(SharedConfig.storageCacheDir)) {
|
||||
path = dir;
|
||||
telegramPath = new File(path, "Telegram");
|
||||
telegramPath = new File(path, "exteraGram");
|
||||
telegramPath.mkdirs();
|
||||
break;
|
||||
}
|
||||
@@ -2080,7 +2080,7 @@ public class ImageLoader {
|
||||
|
||||
if (telegramPath.isDirectory()) {
|
||||
try {
|
||||
File imagePath = new File(telegramPath, "Telegram Images");
|
||||
File imagePath = new File(telegramPath, "exteraGram Images");
|
||||
imagePath.mkdir();
|
||||
if (imagePath.isDirectory() && canMoveFiles(cachePath, imagePath, FileLoader.MEDIA_DIR_IMAGE)) {
|
||||
mediaDirs.put(FileLoader.MEDIA_DIR_IMAGE, imagePath);
|
||||
@@ -2093,7 +2093,7 @@ public class ImageLoader {
|
||||
}
|
||||
|
||||
try {
|
||||
File videoPath = new File(telegramPath, "Telegram Video");
|
||||
File videoPath = new File(telegramPath, "exteraGram Video");
|
||||
videoPath.mkdir();
|
||||
if (videoPath.isDirectory() && canMoveFiles(cachePath, videoPath, FileLoader.MEDIA_DIR_VIDEO)) {
|
||||
mediaDirs.put(FileLoader.MEDIA_DIR_VIDEO, videoPath);
|
||||
@@ -2106,7 +2106,7 @@ public class ImageLoader {
|
||||
}
|
||||
|
||||
try {
|
||||
File audioPath = new File(telegramPath, "Telegram Audio");
|
||||
File audioPath = new File(telegramPath, "exteraGram Audio");
|
||||
audioPath.mkdir();
|
||||
if (audioPath.isDirectory() && canMoveFiles(cachePath, audioPath, FileLoader.MEDIA_DIR_AUDIO)) {
|
||||
AndroidUtilities.createEmptyFile(new File(audioPath, ".nomedia"));
|
||||
@@ -2120,7 +2120,7 @@ public class ImageLoader {
|
||||
}
|
||||
|
||||
try {
|
||||
File documentPath = new File(telegramPath, "Telegram Documents");
|
||||
File documentPath = new File(telegramPath, "exteraGram Documents");
|
||||
documentPath.mkdir();
|
||||
if (documentPath.isDirectory() && canMoveFiles(cachePath, documentPath, FileLoader.MEDIA_DIR_DOCUMENT)) {
|
||||
AndroidUtilities.createEmptyFile(new File(documentPath, ".nomedia"));
|
||||
|
||||
@@ -1036,10 +1036,10 @@ public class ChatAttachAlertDocumentLayout extends ChatAttachAlert.AttachAlertLa
|
||||
|
||||
ListItem fs;
|
||||
try {
|
||||
File telegramPath = new File(ApplicationLoader.applicationContext.getExternalFilesDir(null), "Telegram");
|
||||
File telegramPath = new File(ApplicationLoader.applicationContext.getExternalFilesDir(null), "exteraGram");
|
||||
if (telegramPath.exists()) {
|
||||
fs = new ListItem();
|
||||
fs.title = "Telegram";
|
||||
fs.title = LocaleController.getString("AppName", R.string.AppName);
|
||||
fs.subtitle = LocaleController.getString("AppFolderInfo", R.string.AppFolderInfo);
|
||||
fs.icon = R.drawable.files_folder;
|
||||
fs.file = telegramPath;
|
||||
|
||||
Reference in New Issue
Block a user