diff options
Diffstat (limited to 'filesharing')
-rw-r--r-- | filesharing/advanced/kcm_sambaconf/sambafile.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/filesharing/advanced/kcm_sambaconf/sambafile.cpp b/filesharing/advanced/kcm_sambaconf/sambafile.cpp index 7929b96d..a9eb26a5 100644 --- a/filesharing/advanced/kcm_sambaconf/sambafile.cpp +++ b/filesharing/advanced/kcm_sambaconf/sambafile.cpp @@ -350,12 +350,15 @@ int SambaFile::getSambaVersion() { connect( &testParam, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)), this, TQT_SLOT(testParmStdOutReceived(TDEProcess*,char*,int))); - - - if (testParam.start(TDEProcess::Block,TDEProcess::Stdout)) { - if (_parmOutput.find("3") > -1) + if (testParam.start(TDEProcess::Block, TDEProcess::Stdout)) { + if (_parmOutput.find(" 3.") > -1) { _sambaVersion = 3; - } + } + if (_parmOutput.find(" 4.") > -1) { + _sambaVersion = 4; + } + } + kdDebug(5009) << "Samba version = " << _sambaVersion << endl; @@ -373,7 +376,7 @@ SambaShare* SambaFile::getTestParmValues(bool reload) testParam << "testparm"; testParam << "-s"; - if (getSambaVersion() == 3) + if ((getSambaVersion() == 3) || (getSambaVersion() == 4)) testParam << "-v"; |