blob: e33b65228af925297a8ce4f6e8148cddc9276e59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
--- main.cpp.orig 2011-05-19 03:38:25 UTC
+++ main.cpp
@@ -115,6 +115,10 @@ int main(int argc, char *argv[])
else if (next_option == -1)
{
+ // Strip file://, added by some file browsers
+ if ( memcmp(argv[1], "file://", 7) == 0 )
+ memmove(argv[1], argv[1]+7, strlen(argv[1]) - 6);
+ puts(argv[1]);
MainWindow imageViewer;
if (QApplication::arguments().size() > 1)
imageViewer.openImageFromCommandLine(QApplication::arguments());
|