mirror of https://gitlab.com/basile.b/dexed.git
removed data migration code
This commit is contained in:
parent
b9350ca3b1
commit
a710c6d3ab
|
@ -263,36 +263,6 @@ type
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$IFDEF LINUX}
|
|
||||||
var
|
|
||||||
// flag that indicates that migration is to be done on first call to getCoeditData...
|
|
||||||
doneLinuxDataMigration: boolean = false;
|
|
||||||
|
|
||||||
procedure MigrateOldData;
|
|
||||||
var
|
|
||||||
oldLocation: string;
|
|
||||||
newLocation: string;
|
|
||||||
err: boolean;
|
|
||||||
begin
|
|
||||||
err := false;
|
|
||||||
doneLinuxDataMigration := true;
|
|
||||||
oldLocation := sysutils.GetEnvironmentVariable('HOME') +'/Coedit';
|
|
||||||
if not oldLocation.dirExists then exit;
|
|
||||||
newLocation := getUserDataPath + 'Coedit';
|
|
||||||
try
|
|
||||||
try
|
|
||||||
CopyDirTree(oldLocation, newLocation,
|
|
||||||
[cffOverwriteFile,cffCreateDestDirectory,cffPreserveTime]);
|
|
||||||
except
|
|
||||||
err := true;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
if not err then
|
|
||||||
FileUtil.DeleteDirectory(oldLocation, false);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
procedure TCEPersistentShortcut.assign(aValue: TPersistent);
|
procedure TCEPersistentShortcut.assign(aValue: TPersistent);
|
||||||
var
|
var
|
||||||
src: TCEPersistentShortcut;
|
src: TCEPersistentShortcut;
|
||||||
|
@ -634,10 +604,6 @@ end;
|
||||||
|
|
||||||
function getCoeditDocPath: string;
|
function getCoeditDocPath: string;
|
||||||
begin
|
begin
|
||||||
{$IFDEF LINUX}
|
|
||||||
if not doneLinuxDataMigration then
|
|
||||||
MigrateOldData;
|
|
||||||
{$ENDIF}
|
|
||||||
result := getUserDataPath + 'Coedit' + directorySeparator;
|
result := getUserDataPath + 'Coedit' + directorySeparator;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue