Created
March 26, 2013 03:20
-
-
Save tokuhirom/5242866 to your computer and use it in GitHub Desktop.
SQLite_File does not works on BSD-ish systems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/SQLite_File.pm b/lib/SQLite_File.pm | |
index 90456a3..991ea40 100755 | |
--- a/lib/SQLite_File.pm | |
+++ b/lib/SQLite_File.pm | |
@@ -282,7 +282,7 @@ sub TIEHASH { | |
} | |
else { | |
# if no file specified, use a temp file... | |
- ($fh, $file) = tempfile(); | |
+ ($fh, $file) = tempfile(EXLOCK => 0); | |
# if keep not explicitly specified, | |
# remove the tempfile at destroy... | |
$keep = 0 if !defined $keep; | |
@@ -406,7 +406,7 @@ sub TIEARRAY { | |
} | |
else { | |
# if no file specified, use a temp file... | |
- ($fh, $file) = tempfile(); | |
+ ($fh, $file) = tempfile(EXLOCK => 0); | |
# if keep not explicitly specified, | |
# remove the tempfile at destroy... | |
$keep = 0 if !defined $keep; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@tokuhirom wow, I just saw this. I appreciate it!