diff --git a/CHANGELOG.md b/CHANGELOG.md index f2e1efa..6364151 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 1.6.2 (2017-10-18) +- [Windows] Fixed a bug for `lb_set_logfile()` and `lb_get_logfile()` which failed if logfile was in a samba share + ## 1.6.1 (2017-10-13) - New aliases for display functions: - `lb_warning()` -> `lb_display_warning()` diff --git a/docs/libbash.md b/docs/libbash.md index c1752fb..1469f27 100644 --- a/docs/libbash.md +++ b/docs/libbash.md @@ -1087,6 +1087,18 @@ real_path=$(lb_realpath /path/link_to_file) ### lb_is_writable Test if a path (file or directory) is writable. +#### The weird Samba case +On Windows, this may fails if you are not owner on a network share file/folder. +We recommand you to do something like the following if you can be in this case: + +```bash +if ! lb_is_writable "$logfile" ; then + if [ "$(lb_df_fstype "$(dirname "$logfile")")" != smbfs ] ; then + echo "File is not writable!" + fi +fi +``` + #### Usage ```bash lb_is_writable PATH diff --git a/inc/libbash_gui.vbs b/inc/libbash_gui.vbs index 24aade5..a1bdfe6 100644 --- a/inc/libbash_gui.vbs +++ b/inc/libbash_gui.vbs @@ -7,7 +7,7 @@ ' # Copyright (c) 2017 Jean Prunneaux # ' # Website: https://github.com/pruje/libbash.sh # ' # # -' # Version 1.6.1 (2017-10-13) # +' # Version 1.6.2 (2017-10-18) # ' # # ' ######################################################## diff --git a/libbash.sh b/libbash.sh index e5d9e66..9d52563 100755 --- a/libbash.sh +++ b/libbash.sh @@ -7,7 +7,7 @@ # Copyright (c) 2017 Jean Prunneaux # # Website: https://github.com/pruje/libbash.sh # # # -# Version 1.6.1 (2017-10-13) # +# Version 1.6.2 (2017-10-18) # # # ######################################################## @@ -96,7 +96,7 @@ #################### # libbash current version -lb_version=1.6.1 +lb_version=1.6.2 # default labels lb_default_result_ok_label="... Done!" diff --git a/libbash_gui.sh b/libbash_gui.sh index 678405b..81e6632 100755 --- a/libbash_gui.sh +++ b/libbash_gui.sh @@ -7,7 +7,7 @@ # Copyright (c) 2017 Jean Prunneaux # # Website: https://github.com/pruje/libbash.sh # # # -# Version 1.6.1 (2017-10-13) # +# Version 1.6.2 (2017-10-18) # # # ########################################################