~ubuntu-branches/ubuntu/warty/dnprogs/warty

« back to all changes in this revision

Viewing changes to fal/directory.cc

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Caulfield
  • Date: 2004-05-30 10:13:57 UTC
  • Revision ID: james.westby@ubuntu.com-20040530101357-1geqhhh0teccu0cm
Tags: 2.27
* Fix signal handling in sethost so it doesn't die with an embarrassing
  "Alarm clock" message.
* Add dependancy on modutils. Closes: #251508

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/******************************************************************************
2
 
    (c) 1998-2000 P.J. Caulfield               patrick@tykepenguin.cix.co.uk
 
2
    (c) 1998-2002 P.J. Caulfield               patrick@tykepenguin.cix.co.uk
3
3
 
4
4
    This program is free software; you can redistribute it and/or modify
5
5
    it under the terms of the GNU General Public License as published by
84
84
            bool   double_wildcard = false;
85
85
 
86
86
            dap_access_message *am = (dap_access_message *)m;
87
 
 
88
87
            strcpy(filespec, am->get_filespec());
 
88
 
 
89
            // If we are talking to RSX and it did not send a filespec
 
90
            // then default to *.*
 
91
            if (params.remote_os == 4 && filespec[0] == '\0')
 
92
            {
 
93
                strcpy(filespec, "*.*");
 
94
            }
 
95
 
89
96
            split_filespec(volume, directory, filespec);
90
97
 
91
98
            // If there are two wildcards then we need to be prepared
129
136
                    filespec[0] = '.';
130
137
                    filespec[1] = '\0';
131
138
                }
 
139
                add_vroot(filespec);
132
140
 
133
141
                struct stat st;
134
142
                stat(filespec, &st);
230
238
// We don't use send_file_attributes from fal_task because we need
231
239
// munge the resultant name a bit more than it, also the NAME file
232
240
// is mandatory for directory listings (quite reasonable really!)
233
 
bool fal_directory::send_dir_entry(const char *path, int display)
 
241
bool fal_directory::send_dir_entry(char *path, int display)
234
242
{
235
243
    struct stat st;
236
244
 
278
286
    }
279
287
    else
280
288
    {
281
 
        name_msg->set_namespec(path);
 
289
        char publicname[PATH_MAX];
 
290
        strcpy(publicname, path);
 
291
        remove_vroot(publicname);
 
292
        name_msg->set_namespec(publicname);
282
293
    }
283
294
 
284
295
    name_msg->set_nametype(dap_name_message::FILENAME);
333
344
        dap_status_message st;
334
345
        st.set_errno();
335
346
        st.write(conn);
336
 
     }
 
347
    }
337
348
    return true;
338
349
}
339
350