about summary refs log tree commit diff stats
path: root/src/config/files.c
Commit message (Collapse)AuthorAgeFilesLines
* replace `GString` usage where a simple `strdup` worksSteffen Jaeckel2022-03-141-20/+6
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* use `g_mkdir_with_parents()` instead of home-baked solutionSteffen Jaeckel2022-03-141-8/+7
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* add `files_file_in_account_data_path()`Steffen Jaeckel2022-03-131-0/+21
| | | | | | | | | | | | As all parts of the code invoking the `files_get_account_data_path()` function did the same afterwards, a function has been added with the same behavior. 1. create path 2. `mkdir` of that path 3. return final path Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Format code correctlyMichael Vetter2021-10-051-1/+1
|
* Use whole path as logfile when defined via -fMichael Vetter2020-12-111-8/+14
| | | | | | | | | `profanity -f my` created ~/.local/share/profanity/logs/my.log`. It would be nicer if one could define the actual path, so one can choose another directory or even use /dev/null. Fixes https://github.com/profanity-im/profanity/issues/1442
* Apply coding styleMichael Vetter2020-07-071-35/+35
|
* Revert "Apply coding style"Michael Vetter2020-07-071-37/+37
| | | | | | This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2. Sorting the includes creates some problems.
* Apply coding styleMichael Vetter2020-07-071-37/+37
| | | | Regards https://github.com/profanity-im/profanity/issues/1396
* files.c: use const char *const where appropriateMichael Vetter2020-07-011-2/+2
|
* Use files_get_account_data_path instead of duplicate codeMichael Vetter2020-07-011-1/+19
| | | | | We often had a use case where we want the account specific data dir. Let's create a function for this instead of doing it by hand each time.
* Define POSIX macro to have strdupMichael Vetter2020-06-121-7/+7
| | | | | | | | | | | | | | https://github.com/profanity-im/profanity/commit/98c38dc6d6d29333c63f80327774f094610d8602 sets C99 as standard. strdup() is not part of C99. For now set `-D_POSIX_C_SOURCE=200809L` macro to have strdup() in C99. Using `gnu99` instead would be another option. We should take more care to use glib functions whenever possible. Regards https://github.com/profanity-im/profanity/issues/1357
* Dont manipulate pointer from getenvMichael Vetter2020-06-121-6/+14
| | | | | | | | | | | | Found this when looking to fix bug https://github.com/profanity-im/profanity/issues/1357 Not sure if it is related. man 3 getenv sais: ``` As typically implemented, getenv() returns a pointer to a string within the environment list. The caller must take care not to modify this string, since that would change the environment of the process. ```
* db: Have one database per accountMichael Vetter2020-04-061-16/+0
|
* database: Define chatlog database locationMichael Vetter2020-04-061-0/+17
|
* Allow setting custom log file via -f FILENAMEMichael Vetter2020-02-211-2/+12
| | | | | `profanity -f TEST` will use `~/.local/share/profanity/logs/TEST.log` as the log file.
* Add vim modelineMichael Vetter2019-11-131-0/+1
|
* Update copyright to include 2019Michael Vetter2019-01-221-1/+1
|
* Update copyrightJames Booth2018-01-211-1/+1
|
* Update CopyrightJames Booth2017-01-281-1/+1
|
* Move all filepath handling to files.cJames Booth2016-07-241-12/+61
|
* Move xgd functionsJames Booth2016-07-241-4/+25
|
* Add config/files.cJames Booth2016-07-241-0/+124
'#n494'>494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674