patch-fsck.rb
1 |
--- src/onedb/fsck.rb.orig 2014-04-16 15:31:04.000000000 +0300 |
---|---|
2 |
+++ src/onedb/fsck.rb 2014-04-17 17:49:33.000000000 +0300 |
3 |
@@ -1274,10 +1274,11 @@ |
4 |
|
5 |
calculate_quotas(doc, "uid=#{row[:oid]}", "User") |
6 |
|
7 |
+ doc.root.xpath('//text()[not(normalize-space())]').remove
|
8 |
@db[:user_pool].insert( |
9 |
:oid => row[:oid], |
10 |
:name => row[:name], |
11 |
- :body => doc.root.to_s,
|
12 |
+ :body => doc.root.serialize(:save_with => 0), |
13 |
:uid => row[:oid], |
14 |
:gid => row[:gid], |
15 |
:owner_u => row[:owner_u], |
16 |
@@ -1310,10 +1311,11 @@ |
17 |
|
18 |
calculate_quotas(doc, "gid=#{row[:oid]}", "Group") |
19 |
|
20 |
+ doc.root.xpath('//text()[not(normalize-space())]').remove
|
21 |
@db[:group_pool].insert( |
22 |
:oid => row[:oid], |
23 |
:name => row[:name], |
24 |
- :body => doc.root.to_s,
|
25 |
+ :body => doc.root.serialize(:save_with => 0), |
26 |
:uid => row[:oid], |
27 |
:gid => row[:gid], |
28 |
:owner_u => row[:owner_u], |