Skip to content

Commit cfe1def

Browse files
tigeliPasi Sjöholm
and
Pasi Sjöholm
authored
Fix checks (#177)
Co-authored-by: Pasi Sjöholm <[email protected]>
1 parent a302781 commit cfe1def

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

macOS/Config/Disable creation of '.DS_Store' -files on network shares and removable drives/DisableCreationOfDS_StoreFilesOnNetworkSharesAndRemovableDrives.zsh

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fi
3636
# Disable creation of ".DS_Store" -files on network shares
3737
DisableDS_StoreFilesOnNetworkShares() {
3838
echo "$(date) | Checking if creation of '.DS_Store' -files have been disabled on network shares for user $USER..."
39-
if [[ "$statusnetworkshares" != "0" ]]; then
39+
if [[ "$statusnetworkshares" != "1" ]]; then
4040
echo "$(date) | Creation of '.DS_Store' -files have been enabled on network shares for user $USER. Disabling it..."
4141
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
4242
echo "$(date) | Creation of '.DS_Store' -files have been disabled on network shares for user $USER. This change will take effect the next time when you log in to your Mac-device. Let's continue..."
@@ -48,7 +48,7 @@ fi
4848
# Disable creation of ".DS_Store" -files on removable drives
4949
DisableDS_StoreFilesOnRemovableDrives() {
5050
echo "$(date) | Checking if creation of '.DS_Store' -files have been disabled on removable drives for user $USER..."
51-
if [[ "$statusremovabledrives" != "0" ]]; then
51+
if [[ "$statusremovabledrives" != "1" ]]; then
5252
echo "$(date) | Creation of '.DS_Store' -files have been enabled on removable drives for user $USER. Disabling it..."
5353
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool TRUE
5454
echo "$(date) | Creation of '.DS_Store' -files have been disabled on removable drives for user $USER. This change will take effect the next time when you log in to your Mac-device. All done! Closing script..."

0 commit comments

Comments
 (0)