gui/nfs: add default for local dir, autocreate local dir

Origin commit data
------------------
Branch: ni/coolstream
Commit: 7e9ef5bdf4
Author: martii <m4rtii@gmx.de>
Date: 2013-06-30 (Sun, 30 Jun 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
martii
2013-06-30 09:09:04 +02:00
committed by [CST] Focus
parent ee015598d3
commit 3234f3b8e8

View File

@@ -35,6 +35,7 @@
#endif #endif
#include <system/fsmounter.h> #include <system/fsmounter.h>
#include <system/helpers.h>
#include <cstdlib> #include <cstdlib>
#include <fstream> #include <fstream>
#include <limits> #include <limits>
@@ -202,6 +203,9 @@ CFSMounter::MountRes CFSMounter::mount(const std::string &ip, const std::string
printf("[CFSMounter] Mount(%d) %s:%s -> %s\n", (int) fstype, ip.c_str(), dir.c_str(), local_dir.c_str()); printf("[CFSMounter] Mount(%d) %s:%s -> %s\n", (int) fstype, ip.c_str(), dir.c_str(), local_dir.c_str());
CFileHelpers fh;
fh.createDir(local_dir.c_str(), 0755);
if (isMounted(local_dir)) if (isMounted(local_dir))
{ {
printf("[CFSMounter] FS mount error %s already mounted\n", local_dir.c_str()); printf("[CFSMounter] FS mount error %s already mounted\n", local_dir.c_str());