Compare commits

...

3 Commits

Author SHA1 Message Date
benoitperrin 1abb470819 Fix adept_remove -O placing result in a nested sub-directory
With -O <dir>, the output path was built from the full input path
instead of its base name:

    filename = std::string(inputFile);
    if (outputDir)
        filename = std::string(outputDir) + "/" + filename;

So `adept_remove -O /out /tmp/x/book.epub` wrote the result to
/out/tmp/x/book.epub (createPath() silently creating the intermediate
directories) instead of /out/book.epub.

-O is documented as the directory "were to put result", so only the
input's base name should be appended. acsmdownloader is unaffected
because it derives its output name from the title metadata, not from
the input path.

Reduce the input to its base name before prefixing it with -O.
2026-07-01 11:14:30 +02:00
soutade 324c566756 Fix help of adept_load_mgt 2026-04-12 19:44:11 +02:00
soutade 334aa4dae5 Update version to 0.8.9 2026-04-12 19:42:11 +02:00
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -37,7 +37,7 @@
#define ACS_SERVER "https://adeactivate.adobe.com/adept"
#endif
#define LIBGOUROU_VERSION "0.8.8"
#define LIBGOUROU_VERSION "0.8.9"
namespace gourou
{
+2 -2
View File
@@ -355,7 +355,7 @@ static void usage(const char* cmd)
std::cout << " " << "-l|--list" << "\t\t" << "List all loaned books" << std::endl;
std::cout << " " << "-r|--return" << "\t\t" << "Return a loaned book" << std::endl;
std::cout << " " << "-d|--delete" << "\t\t" << "Delete a loan entry without returning it" << std::endl;
std::cout << " " << "-N|--no-notify" << "\t\t" << "Don't notify server, even if requested" << std::endl;
std::cout << " " << "-N|--no-notify" << "\t" << "Don't notify server, even if requested" << std::endl;
std::cout << " " << "-v|--verbose" << "\t\t" << "Increase verbosity, can be set multiple times" << std::endl;
std::cout << " " << "-V|--version" << "\t\t" << "Display libgourou version" << std::endl;
std::cout << " " << "-h|--help" << "\t\t" << "This help" << std::endl;
@@ -396,7 +396,7 @@ int main(int argc, char** argv)
{0, 0, 0, 0 }
};
c = getopt_long(argc, argv, "d:lr:D:vVh",
c = getopt_long(argc, argv, "d:lr:D:NvVh",
long_options, &option_index);
if (c == -1)
break;
+5 -1
View File
@@ -88,7 +88,11 @@ public:
filename = std::string(inputFile);
if (outputDir)
filename = std::string(outputDir) + "/" + filename;
{
char* basepath = strdup(inputFile);
filename = std::string(outputDir) + "/" + basename(basepath);
free(basepath);
}
}
if (endsWith(filename, ".epub"))