mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
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:
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user