Created
February 15, 2017 21:49
-
-
Save tumugin/7d64df33302a640c69bc0aa40fcbbbbd to your computer and use it in GitHub Desktop.
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 core/plugin/photo/model/photo.rb core/plugin/photo/model/photo.rb | |
index b954ead..02c8ba7 100644 | |
--- core/plugin/photo/model/photo.rb | |
+++ core/plugin/photo/model/photo.rb | |
@@ -21,7 +21,7 @@ module Plugin::Photo | |
when String | |
if uri.start_with?('http') | |
photos[uri.hash] ||= new(perma_link: uri) | |
- elsif uri.start_with?('/') | |
+ elsif uri.start_with?('/') || uri.match(/[A-Z]:\/.*/) | |
uri = Retriever::URI.new(scheme: 'file', path: uri) | |
photos[uri.hash] ||= new(perma_link: uri) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Windowsでは*nix環境のような
/
から始まるファイルパスではなく[ドライブレター]:/
な形になるのでそれに合うようにコードを変更しました。最近のmikutterがWindows環境でクラッシュするバグが直るはずです。