foreman_packages 1.1.0 → 1.1.1
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.
@@ -22,10 +22,12 @@ class ForemanPackages::Sypackage < ActiveRecord::Base
|
|
22
22
|
dir_exist_status = File.exist?(root_dir_name )
|
23
23
|
if dir_exist_status
|
24
24
|
#FileUtils.rm_r root_dir_name
|
25
|
+
else
|
26
|
+
#创建目录结构
|
27
|
+
Dir::mkdir(root_dir_name)
|
25
28
|
end #默认删除该目录,然后重新创建,主要目的防止文件或文件夹被误删除
|
26
29
|
|
27
|
-
|
28
|
-
Dir::mkdir(root_dir_name)
|
30
|
+
|
29
31
|
if !File.exist?(root_dir_name + "/files")
|
30
32
|
Dir::mkdir(root_dir_name + "/files")
|
31
33
|
end
|
@@ -17,10 +17,12 @@ class ForemanPackages::Sypackagemodel < ActiveRecord::Base
|
|
17
17
|
dir_exist_status = File.exist?(root_dir_name )
|
18
18
|
if dir_exist_status
|
19
19
|
#FileUtils.rm_r root_dir_name
|
20
|
+
else
|
21
|
+
#创建目录结构
|
22
|
+
Dir::mkdir(root_dir_name)
|
20
23
|
end #默认删除该目录,然后重新创建,主要目的防止文件或文件夹被误删除
|
21
24
|
|
22
|
-
|
23
|
-
Dir::mkdir(root_dir_name)
|
25
|
+
|
24
26
|
if !File.exist?(root_dir_name + "/files")
|
25
27
|
Dir::mkdir(root_dir_name + "/files")
|
26
28
|
end
|