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 0bcc0416 authored by rswindell's avatar rswindell

Address issue raiseed by Immortal:

On Linux, using DOSEMU, he would end up with both door.sys and DOOR.SYS in the
node directory and some doors would open the wrong file and fail to initialize.
Solution: delete all case-versions of drop filenames before creating them.
Don't you just love case-sensitive file systems? :-(
parent defc151c
......@@ -343,6 +343,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
if(misc&XTRN_LWRCASE)
strlwr(tmp);
sprintf(str,"%s%s",dropdir,tmp);
removecase(str);
if((file=nopen(str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT);
return;
......@@ -456,6 +457,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
if(misc&XTRN_LWRCASE)
strlwr(tmp);
sprintf(str,"%s%s",dropdir,tmp);
removecase(str);
if((file=nopen(str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT);
return;
......@@ -516,6 +518,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
if(misc&XTRN_LWRCASE)
strlwr(tmp);
sprintf(str,"%s%s",dropdir,tmp);
removecase(str);
if((file=nopen(str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT);
return;
......@@ -655,6 +658,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
if(misc&XTRN_LWRCASE)
strlwr(tmp);
sprintf(str,"%s%s",dropdir,tmp);
removecase(str);
if((file=nopen(str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT);
return;
......@@ -701,6 +705,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
if(misc&XTRN_LWRCASE)
strlwr(tmp);
sprintf(str,"%s%s",dropdir,tmp);
removecase(str);
if((file=nopen(str,O_WRONLY|O_CREAT|O_TRUNC))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC);
return;
......@@ -837,6 +842,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
if(misc&XTRN_LWRCASE)
strlwr(tmp);
sprintf(str,"%s%s",dropdir,tmp);
removecase(str);
if((file=nopen(str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT);
return;
......@@ -948,6 +954,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
if(misc&XTRN_LWRCASE)
strlwr(tmp);
sprintf(str,"%s%s",dropdir,tmp);
removecase(str);
if((file=nopen(str,O_WRONLY|O_CREAT|O_TRUNC))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC);
return;
......@@ -1048,6 +1055,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
if(misc&XTRN_LWRCASE)
strlwr(tmp);
sprintf(str,"%s%s",dropdir,tmp);
removecase(str);
if((file=nopen(str,O_WRONLY|O_CREAT|O_TRUNC))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC);
return;
......@@ -1154,6 +1162,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
if(misc&XTRN_LWRCASE)
strlwr(tmp);
sprintf(str,"%s%s",dropdir,tmp);
removecase(str);
if((file=nopen(str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT);
return;
......@@ -1228,6 +1237,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
if(misc&XTRN_LWRCASE)
strlwr(tmp);
sprintf(str,"%s%s",dropdir,tmp);
removecase(str);
if((file=nopen(str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT);
return;
......@@ -1252,6 +1262,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
if(misc&XTRN_LWRCASE)
strlwr(tmp);
sprintf(str,"%s%s",dropdir,tmp);
removecase(str);
if((file=nopen(str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT);
return;
......@@ -1276,6 +1287,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
if(misc&XTRN_LWRCASE)
strlwr(tmp);
sprintf(str,"%s%s",dropdir,tmp);
removecase(str);
if((file=nopen(str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT);
return;
......@@ -1317,6 +1329,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
if(misc&XTRN_LWRCASE)
strlwr(tmp);
sprintf(str,"%s%s",dropdir,tmp);
removecase(str);
if((file=nopen(str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT);
return;
......
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