diff --git a/winixd/core/mounts.cpp b/winixd/core/mounts.cpp index 77523a5..f24be67 100644 --- a/winixd/core/mounts.cpp +++ b/winixd/core/mounts.cpp @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2009-2018, Tomasz Sowa + * Copyright (c) 2009-2021, Tomasz Sowa * All rights reserved. * * 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); 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); } diff --git a/winixd/functions/functions.cpp b/winixd/functions/functions.cpp index 88ab17d..cb8d701 100644 --- a/winixd/functions/functions.cpp +++ b/winixd/functions/functions.cpp @@ -168,7 +168,9 @@ Error Functions::CheckSpecialFile(const Item & item) { log << log3 << "Functions: reloading mount points" << logend; + cur->mount = system->mounts.GetEmptyMount(); system->mounts.ReadMounts(item.content); + cur->mount = system->mounts.pmount; templates->ReadNewIndexTemplates(); templates->ReadNewChangeTemplates();