From 420527ccfeec888ca51e2e6b14c44bd25ccc53ab Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Tue, 19 Dec 2000 15:05:42 +0000 Subject: [PATCH] Fixes for attachment --- docs/notework.txt | 10 ++++++++++ golded3/gefile.cpp | 4 +++- golded3/geinit.cpp | 2 +- golded3/gepost.cpp | 5 ++++- golded3/geview.cpp | 2 +- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/notework.txt b/docs/notework.txt index d6268a6..d3d2dbe 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,16 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, December xx 2000 ______________________________________________________________________ ++ If filenames specified without path and File Attach attribute is set + Attachpath automatically prepended to every filename. + +- Fixed date in attach selection menu. + +- If directory typed in subject field without slash at the end files + from proper directory selected instead of GOLDEDPATH. + +- Fixed attached file size display if path starts from slash. + - Support for old Fastechoes reverted back. - Area Catch-up and Scan now disabled if there's active area. This diff --git a/golded3/gefile.cpp b/golded3/gefile.cpp index ed027aa..9f023a2 100644 --- a/golded3/gefile.cpp +++ b/golded3/gefile.cpp @@ -333,6 +333,8 @@ void FileSelect(GMsg* msg, char* title, FileSpec* fspec) { MapPath(fbuf); Path fullpath; + if(fbuf[0] and is_dir(fbuf)) + AddBackslash(fbuf); extractdirname(fullpath, fbuf); const char* wildlistname = (isslash(fbuf[strlen(fbuf)-1]) or is_dir(fbuf)) ? "*" : CleanFilename(fbuf); gposixdir f(fullpath); @@ -371,7 +373,7 @@ void FileSelect(GMsg* msg, char* title, FileSpec* fspec) { strcpy(fb->name, de->name.c_str()); fb->selected = false; FFTime ftm; - dword _ftm = GetFiletime(fb->name); + dword _ftm = gfixstattime(de->stat_info.st_mtime); memcpy(&ftm, &_ftm, sizeof(FFTime)); fb->year = ftm.ft_year + 1980; fb->month = ftm.ft_month; diff --git a/golded3/geinit.cpp b/golded3/geinit.cpp index dd94526..0db077f 100644 --- a/golded3/geinit.cpp +++ b/golded3/geinit.cpp @@ -646,7 +646,7 @@ void Initialize(int argc, char* argv[]) { truepathtmp = CFG->goldpath; maketruepath(truepathtmp); strxcpy(CFG->goldpath, truepathtmp.c_str(), sizeof(CFG->goldpath)-1); - strxmerge(CFG->goldpath, sizeof(Path), truepathtmp.c_str(), "/", NULL); + strxmerge(CFG->goldpath, sizeof(Path), truepathtmp.c_str(), GOLD_SLASH_STR, NULL); strxmerge(CFG->goldcfg, sizeof(Path), CFG->goldpath, CleanFilename(cmdlinecfg), NULL); // Call install detect procedure diff --git a/golded3/gepost.cpp b/golded3/gepost.cpp index 907358d..4f4a6de 100644 --- a/golded3/gepost.cpp +++ b/golded3/gepost.cpp @@ -133,7 +133,10 @@ void CheckSubject(GMsg* msg, char* subj) { fspec[fspecs].delsent = YES; ptr++; } - strxcpy(fspec[fspecs].path, ptr, sizeof(Path)); + if((ptr == CleanFilename(ptr)) and *CFG->attachpath) + strxmerge(fspec[fspecs].path, sizeof(Path), CFG->attachpath, ptr, NULL); + else + strxcpy(fspec[fspecs].path, ptr, sizeof(Path)); FileSelect(msg, LNG->AttachFiles, &fspec[fspecs]); specfiles += fspec[fspecs].files; if(fspec[fspecs].files) diff --git a/golded3/geview.cpp b/golded3/geview.cpp index 082e874..60d1c86 100644 --- a/golded3/geview.cpp +++ b/golded3/geview.cpp @@ -286,7 +286,7 @@ void GMsgHeaderView::Paint() { while(ptr) { if(*ptr == '^') ptr++; - if((isalpha(*ptr) and (ptr[1] == ':')) or ((ptr[0] == '\\') and (ptr[1] == '\\'))) + if((isalpha(*ptr) and (ptr[1] == ':')) or (ptr[0] == '\\') or (ptr[0] == '/')) strcpy(buf2, ptr); else sprintf(buf2, "%s%s", CFG->inboundpath, ptr);