added: mount points are read from db: /etc/fstab
changed: mount points parser allows empty lines (with some white characters) git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@518 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -16,7 +16,8 @@ content.o: ../core/error.h ../core/db.h ../core/group.h
|
||||
content.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/data.h
|
||||
content.o: ../core/dirs.h ../core/users.h ../core/groups.h
|
||||
content.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
|
||||
content.o: ../core/mount.h ../core/misc.h
|
||||
content.o: ../core/mount.h ../core/misc.h ../core/plugin.h ../core/request.h
|
||||
content.o: ../core/data.h ../core/pluginmsg.h
|
||||
createthread.o: content.h ../core/item.h ../templates/templates.h
|
||||
createthread.o: ../templates/patterncacher.h ../core/thread.h
|
||||
createthread.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
||||
|
||||
@@ -24,7 +24,7 @@ class Content
|
||||
{
|
||||
Templates templates;
|
||||
|
||||
|
||||
void CheckSpecialFile();
|
||||
|
||||
void PrepareUrl(Item & item);
|
||||
|
||||
|
||||
@@ -16,6 +16,24 @@
|
||||
|
||||
|
||||
|
||||
void Content::CheckSpecialFile()
|
||||
{
|
||||
static std::string fstab = "fstab";
|
||||
|
||||
Item * etc = data.dirs.GetEtcDir();
|
||||
|
||||
if( !etc )
|
||||
return;
|
||||
|
||||
if( request.item.parent_id != etc->id )
|
||||
return;
|
||||
|
||||
if( request.item.url == fstab )
|
||||
{
|
||||
log << log3 << "Content: reloading mount points" << logend;
|
||||
data.mounts.ReadMounts(request.item.content);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -118,6 +136,7 @@ bool adding = true;
|
||||
else
|
||||
PostFunEmacsEdit(with_url);
|
||||
|
||||
CheckSpecialFile();
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user