[Fencommits] fenfire-hs: force .nt suffix for now
Benja Fallenstein
benja.fallenstein at gmail.com
Tue Feb 13 20:21:38 EET 2007
Tue Feb 13 20:21:13 EET 2007 Benja Fallenstein <benja.fallenstein at gmail.com>
* force .nt suffix for now
diff -rN -u old-fenfire-hs/Fenfire.fhs new-fenfire-hs/Fenfire.fhs
--- old-fenfire-hs/Fenfire.fhs 2007-02-13 20:21:38.000000000 +0200
+++ new-fenfire-hs/Fenfire.fhs 2007-02-13 20:21:38.000000000 +0200
@@ -375,9 +375,14 @@
widgetHide dialog
case response of
ResponseAccept -> do Just fileName <- fileChooserGetFilename dialog
- saveGraph graph fileName
- return (fileName, True)
+ let fileName' = checkSuffix fileName
+ saveGraph graph fileName'
+ return (fileName', True)
_ -> return (fileName0, False)
+
+checkSuffix :: FilePath -> FilePath
+checkSuffix s | Data.List.isSuffixOf ".nt" s = s
+ | otherwise = s ++ ".nt"
confirmSave :: (?vs :: ViewSettings, ?pw :: Window, ?uriMaker :: URIMaker) =>
Bool -> HandlerAction FenState ->
More information about the Fencommits
mailing list