Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 0b377649 authored by rswindell's avatar rswindell

Created getfname function to return pointer to filename portion of a path string.

parent 5976a64b
......@@ -543,6 +543,21 @@ char* DLLCALL padfname(char *filename, char *str)
return(str);
}
char* DLLCALL getfname(char* path)
{
char *fname;
fname=strrchr(path,'\\');
if(fname==NULL)
fname=strrchr(path,'/');
if(fname!=NULL)
fname++;
else
fname=path;
return(fname);
}
/****************************************************************************/
/* Turns FILE .EXT into FILE.EXT */
/****************************************************************************/
......
......@@ -522,7 +522,7 @@ public:
bool removefcdt(file_t* f);
bool movefile(file_t* f, int newdir);
char * getfilespec(char *str);
int delfiles(char *path, char *spec);
uint delfiles(char *path, char *spec);
bool checkfname(char *fname);
bool addtobatdl(file_t* f);
......@@ -694,6 +694,7 @@ extern "C" {
DLLEXPORT BOOL DLLCALL removefiledat(scfg_t* cfg, file_t* f);
DLLEXPORT BOOL DLLCALL addfiledat(scfg_t* cfg, file_t* f);
DLLEXPORT BOOL DLLCALL findfile(scfg_t* cfg, uint dirnum, char *filename);
DLLEXPORT char * DLLCALL getfname(char *path);
DLLEXPORT char * DLLCALL padfname(char *filename, char *str);
DLLEXPORT char * DLLCALL unpadfname(char *filename, char *str);
DLLEXPORT BOOL DLLCALL rmuserxfers(scfg_t* cfg, int fromuser, int destuser, char *fname);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment