fixed: in Functions::CheckSpecialFile() after parsing new mount points
the cur->mount pointer was pointing at the old mount object (which may no longer exists)
This commit is contained in:
parent
4625451c85
commit
a2b19547a3
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2018, Tomasz Sowa
|
* Copyright (c) 2009-2021, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -222,6 +222,11 @@ void Mounts::ReadMounts(const std::wstring & mounts)
|
||||||
mount_parser.Parse(mounts, mount_tab);
|
mount_parser.Parse(mounts, mount_tab);
|
||||||
|
|
||||||
CalcCurMount();
|
CalcCurMount();
|
||||||
|
|
||||||
|
// IMPROVE ME
|
||||||
|
// cur->mount is pointing to the empty mount (it is set in functions.cpp in CheckSpecialFile method)
|
||||||
|
// may would be better to call WINIX_FSTAB_CHANGED after the cur->mount is set?
|
||||||
|
// some plugins are using 'cur' object
|
||||||
plugin->Call((Session*)0, WINIX_FSTAB_CHANGED);
|
plugin->Call((Session*)0, WINIX_FSTAB_CHANGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,9 @@ Error Functions::CheckSpecialFile(const Item & item)
|
||||||
{
|
{
|
||||||
log << log3 << "Functions: reloading mount points" << logend;
|
log << log3 << "Functions: reloading mount points" << logend;
|
||||||
|
|
||||||
|
cur->mount = system->mounts.GetEmptyMount();
|
||||||
system->mounts.ReadMounts(item.content);
|
system->mounts.ReadMounts(item.content);
|
||||||
|
cur->mount = system->mounts.pmount;
|
||||||
templates->ReadNewIndexTemplates();
|
templates->ReadNewIndexTemplates();
|
||||||
templates->ReadNewChangeTemplates();
|
templates->ReadNewChangeTemplates();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue