atk_toolbox 0.0.43 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 761801ba22c1d30a0c72ecdba9f5da5205c77803f0cb81525f05de596cc32444
4
- data.tar.gz: 84437efa1751166bd1a0981ac6a637bb70c3fdc8919045a2dfb7282fc9813fbc
3
+ metadata.gz: 611e37e313ff865ed41b1f515404248c93b6e0ec23689d14d45a573be375a300
4
+ data.tar.gz: d4ca3c64baeb148ab735ab9c143647602118979236f2888d2785c15ff12728d1
5
5
  SHA512:
6
- metadata.gz: 61e43872bb3d28b5228cb4e1ba969b2d890ce6011117034a14b3a3affbf11be6fcde68d27d9da720599c20c38394eb8d70fe830552787c111a8762bebf69f353
7
- data.tar.gz: 310564cf5ebadeb553d1a438ce64b31e8b84cadb7cde7aa669e76510bd6dcbc9398b6b04f61c488a34d17dba5ff7c943962a3cf41bb666bdb2f0afd2569d255e
6
+ metadata.gz: 0656a4f73e1f0e1aba9ee12edd07e0f599b93ece9c936caa08e85be69712096a6228b558f3d7422d05c0a1938f67dc22a0b2c39f8bd232924a1435bc8e08f787
7
+ data.tar.gz: f40f8c9d8b9f2f44175888c20007cddb10555ad9435402504293ee543b9e3adb84b2abb9904974713c3925cf99fa238a96a5348bc410a3c4cdc7766c446ce693
@@ -16,6 +16,11 @@ def set_command(name, code)
16
16
  system("sudo", "cp", local_place, exec_path)
17
17
  system("sudo", "chmod", "ugo+x", exec_path)
18
18
  elsif OS.is?("windows")
19
+ # check for invalid file paths, see https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
20
+ if name =~ /[><:"\/\\|?*]/
21
+ puts "Sorry #{name} isn't a valid file path on windows"
22
+ return ""
23
+ end
19
24
  username = `powershell -command "echo $env:UserName"`.chomp
20
25
  exec_path = "C:\\Users\\#{username}\\AppData\\local\\Microsoft\\WindowsApps\\#{name}"
21
26
 
@@ -1,3 +1,3 @@
1
1
  module AtkToolbox
2
- VERSION = '0.0.43'
2
+ VERSION = '0.0.44'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atk_toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.43
4
+ version: 0.0.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Hykin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-06 00:00:00.000000000 Z
11
+ date: 2019-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zip