ALT Linux Bugzilla
– Attachment 2657 Details for
Bug 15636
Патч, позволяющий дописывать расширения *.cht к именам файлов, которые уже зарегистрированы в системе.
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
re-attaching patch 2629
chemtool-cht.patch (text/plain), 1.16 KB, created by
Michael Shigorin
on 2008-05-31 02:15:43 MSD
(
hide
)
Description:
re-attaching patch 2629
Filename:
MIME Type:
Creator:
Michael Shigorin
Created:
2008-05-31 02:15:43 MSD
Size:
1.16 KB
patch
obsolete
>diff -uNr chemtool-1.6.11/main.c chemtool-1.6.11-new/main.c >--- chemtool-1.6.11/main.c 2007-08-26 14:49:26 +0300 >+++ chemtool-1.6.11-new/main.c 2008-05-16 00:42:45 +0300 >@@ -2938,7 +2938,7 @@ > or save operations as defined by the current i/o mode and displays error > message dialog if necessary */ > { >- int error; >+ int error, length; > char errtext[255]; > char oldname[512]; > char *tempstr; >@@ -2950,6 +2950,23 @@ > strcpy (oldname, filename); > strcpy (filename, > gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs))); >+ >+ while ((length = strlen(filename)) > 507 ) >+ { >+ snprintf (errtext, 255, "Input filename %s contains %d\r characters and this too long.\n", filename, strlen(filename)); >+ gtk_label_set_text (GTK_LABEL (message), errtext); >+ gtk_widget_show (messagew); >+ gtk_grab_add (messagew); >+ strcpy (filename, oldname); >+ snprintf (errtext,255, "Chemtool 1.6.11"); >+ gtk_window_set_title (GTK_WINDOW (window), errtext); >+ >+ return; >+ } >+ >+ if (strstr(filename, ".cht") == NULL) >+ strcat(filename, ".cht"); >+ > if (datadir == NULL || (int)strlen (datadir) == 0) > { > tempstr = strrchr (filename, '/');
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 15636
:
2612
|
2629
| 2657