Remove unnecessary logging

This was added to figure out the cause of a bug. Now that it's clear,
and fixed, I can remove these logs.
This commit is contained in:
Vishesh Handa
2020-10-18 09:46:43 +02:00
parent f7e6730b9e
commit 6b1a9caf86
2 changed files with 4 additions and 8 deletions

View File

@ -60,11 +60,6 @@ class JournalApp extends StatefulWidget {
var dir = await getApplicationDocumentsDirectory();
appState.gitBaseDirectory = dir.path;
Log.i("GitBaseDirectory: ${dir.path}");
await for (var fsEntity in dir.list()) {
Log.i(" ${fsEntity.path}");
}
Log.i('-----');
await settings.migrate(pref, appState.gitBaseDirectory);

View File

@ -334,21 +334,22 @@ class Settings extends ChangeNotifier {
var oldDir = Directory(p.join(gitBaseDir, '../files'));
if (oldDir.existsSync()) {
// Move everything from the old dir
await for (var fsEntity in oldDir.list()) {
var stream = await (oldDir.list().toList());
for (var fsEntity in stream) {
var stat = await fsEntity.stat();
if (stat.type != FileSystemEntityType.directory) {
var fileName = p.basename(fsEntity.path);
if (fileName == 'cache.json') {
await File(fsEntity.path).delete();
}
return;
continue;
}
var folderName = p.basename(fsEntity.path);
if (folderName.startsWith('journal') ||
folderName.startsWith('ssh')) {
var newPath = p.join(gitBaseDir, folderName);
if (Directory(newPath).existsSync()) {
if (!Directory(newPath).existsSync()) {
await Directory(fsEntity.path).rename(newPath);
}
}