aboutsummaryrefslogtreecommitdiff
path: root/fileio.c
diff options
context:
space:
mode:
authortenox7 <as@tenoware.com>2018-07-09 02:32:04 -0700
committertenox7 <as@tenoware.com>2018-07-09 02:32:04 -0700
commitbbb103fb748ff87c6645e7280b49643c54345dc7 (patch)
treee050993139e237708f8fb7b7478b66a3e74f0b11 /fileio.c
parentfd19e39d3a8a0a1ae9a8f1fda8ea8691c8fb98b3 (diff)
downloadwfm-bbb103fb748ff87c6645e7280b49643c54345dc7.tar.gz
paths cleanup
Diffstat (limited to 'fileio.c')
-rw-r--r--fileio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fileio.c b/fileio.c
index 1f66aac..4c70702 100644
--- a/fileio.c
+++ b/fileio.c
@@ -262,7 +262,6 @@ void fileio_re_rmdir(char *dirname) {
if(!dir)
error("Unable to remove directory..");
-
direntry=readdir(dir);
while(direntry!=0) {
if(strncmp(direntry->d_name, ".", 1) && strncmp(direntry->d_name, "..", 2)) {
@@ -353,7 +352,6 @@ void fileio_move(void) {
error("Unable to move file. <BR>[%d: %s]<BR>[SRC=%s] [DST=%s]", errno, strerror(errno), wp.phys_filename, wp.final_destination);
wfm_commit(MOVE, NULL);
-
}
//
@@ -441,8 +439,8 @@ void re_dir_ui(char *vdir, int level) {
if(strlen(re_phys_dirname)<2 || strlen(re_phys_dirname)>(sizeof(wp.phys_dirname)-2))
error("Invalid directory name.");
- if(regexec(&dotdot, re_phys_dirname, 0, 0, 0)==0) error("Invalid directory name.");
- if(strlen(re_phys_dirname) < strlen(cfg.homedir)) error("Invalid directory name.");
+ if(strlen(re_phys_dirname) < strlen(cfg.homedir)) error("Invalid directory name 4.");
+ if(strstr(re_phys_dirname, "..")) error("Double dots in directory name");
nentr=scandir(re_phys_dirname, &direntry, 0, alphasort);