Changeset 337 in PSPA


Ignore:
Timestamp:
Feb 20, 2013, 2:58:45 PM (11 years ago)
Author:
garnier
Message:

bug #43 fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_serverFileSelector.cc

    r336 r337  
    3535   
    3636    /* read the directory's contents, print out the name of each entry.   */
    37     printf("Directory contents:\n");
    3837    DIR* dir = opendir(workingDir_.c_str());
    3938    if (!dir) {
    40         perror("opendir");
    4139        exit(1);
    4240    }
     
    4543        /* check if the given entry is a directory. */
    4644        if (stat(entry->d_name, &dir_stat) == -1) {
    47             perror("stat:");
    48             printf("stat:%s\n",entry->d_name);
    4945            continue;
    50         } else {
    51             printf("false%s\n", entry->d_name);
    5246        }
    5347    }
     
    110104    /* first, save path of current working directory */
    111105    if (!getcwd(cwd, MAX_DIR_PATH+1)) {
    112         perror("getcwd:");
    113106        return;
    114107    }
     
    118111    dir = opendir(folder);
    119112    if (!dir) {
    120         fprintf(stderr, "Cannot read directory '%s': ", cwd);
    121         perror("");
    122113        return;
    123114    }
     
    136127        /* check if the given entry is a directory. */
    137128        if (entry->d_type == DT_DIR) {
    138             printf("++DIR %s\n",entry->d_name);
    139129            Wt::WIconPair *folderIcon = new Wt::WIconPair("htdocs/yellow-folder-closed.png",
    140130                                                          "htdocs/yellow-folder-open.png", false);
     
    144134           
    145135        } else {
    146             printf("++FILE %s\n",entry->d_name);
    147136           
    148137            /* check if the pattern matchs. */
    149138            if (boost::algorithm::ends_with(entry->d_name, pattern)) {
    150139                treeFileRoot->addChildNode(new Wt::WTreeNode(entry->d_name));
    151                 printf("-----%s/%s\n", cwd, entry->d_name);
    152140            }
    153141        }
Note: See TracChangeset for help on using the changeset viewer.